+ cppcheck fixes

This commit is contained in:
wmayer
2013-09-20 21:00:45 +02:00
parent de4a92346f
commit dbf78870bc
4 changed files with 12 additions and 5 deletions

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);