diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp
index 55108eb8c7858314ab5dc5461fcf783d99474063..25536e55d57a5da7fb9e0ba4c198c161eac4dde4 100644
--- a/src/PYTHON/python_impl.cpp
+++ b/src/PYTHON/python_impl.cpp
@@ -35,6 +35,12 @@ enum{NONE,INT,DOUBLE,STRING,PTR};
 
 PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp)
 {
+  ninput = noutput = 0;
+  istr = NULL;
+  ostr = NULL;
+  format = NULL;
+  length_longstr = 0;
+
   // pfuncs stores interface info for each Python function
 
   nfunc = 0;