Pārlūkot izejas kodu

HPCC-17298 Uninitialized member variable in Python plugin

Reported by Coverity

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 gadi atpakaļ
vecāks
revīzija
2f88fcd7b5
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  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);
         out.appendf("\n__result__ = __user__(%s)\n", params);
         return out;
         return out;
     }
     }
-    PyThreadState *tstate;
-    bool initialized;
-    HINSTANCE pythonLibrary;
+    PyThreadState *tstate = nullptr;
+    bool initialized = false;
+    HINSTANCE pythonLibrary = 0;
     OwnedPyObject namedtuple;      // collections.namedtuple
     OwnedPyObject namedtuple;      // collections.namedtuple
     OwnedPyObject namedtupleTypes; // dictionary of return values from namedtuple()
     OwnedPyObject namedtupleTypes; // dictionary of return values from namedtuple()
     OwnedPyObject compiledScripts; // dictionary of previously compiled scripts
     OwnedPyObject compiledScripts; // dictionary of previously compiled scripts