+ cppcheck fixes

This commit is contained in:
wmayer
2013-09-20 21:00:45 +02:00
parent 9ff1908a30
commit 7f874b9767
4 changed files with 12 additions and 5 deletions
+4 -1
View File
@@ -435,10 +435,13 @@ void PythonDebugger::runFile(const QString& fn)
dict = PyDict_Copy(dict);
if (PyDict_GetItemString(dict, "__file__") == NULL) {
PyObject *f = PyString_FromString((const char*)pxFileName);
if (f == NULL)
if (f == NULL) {
fclose(fp);
return;
}
if (PyDict_SetItemString(dict, "__file__", f) < 0) {
Py_DECREF(f);
fclose(fp);
return;
}
Py_DECREF(f);