loadparm: fix a load of uninitialized memory errors found by valgrind.
authorMichael Adam <obnox@samba.org>
Thu, 2 Feb 2012 23:21:50 +0000 (00:21 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 3 Feb 2012 10:10:29 +0000 (11:10 +0100)
lib/util/params.c

index 45fcd5bdc83d695d32e51c768bf652915f6ba2f0..3f1d5359992bf2bec9a8c829c055e59ab2211a65 100644 (file)
@@ -556,7 +556,7 @@ bool pm_process( const char *FileName,
   else                                        /* If we don't have a buffer   */
     {                                         /* allocate one, then parse,   */
     InFile->bSize = BUFR_INC;                         /* then free.                  */
-    InFile->bufr = talloc_array(InFile, char, InFile->bSize );
+    InFile->bufr = talloc_zero_array(InFile, char, InFile->bSize );
     if( NULL == InFile->bufr )
       {
       DEBUG(0,("%s memory allocation failure.\n", func));