瀏覽代碼

HPCC-17298 Uninitialized member variable in Python plugin

Reported by Coverity

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 年之前
父節點
當前提交
2f88fcd7b5
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      plugins/pyembed/pyembed.cpp

+ 3 - 3
plugins/pyembed/pyembed.cpp

@@ -438,9 +438,9 @@ protected:
         out.appendf("\n__result__ = __user__(%s)\n", params);
         return out;
     }
-    PyThreadState *tstate;
-    bool initialized;
-    HINSTANCE pythonLibrary;
+    PyThreadState *tstate = nullptr;
+    bool initialized = false;
+    HINSTANCE pythonLibrary = 0;
     OwnedPyObject namedtuple;      // collections.namedtuple
     OwnedPyObject namedtupleTypes; // dictionary of return values from namedtuple()
     OwnedPyObject compiledScripts; // dictionary of previously compiled scripts