From: Michael Adam Date: Thu, 2 Feb 2012 23:21:50 +0000 (+0100) Subject: loadparm: fix a load of uninitialized memory errors found by valgrind. X-Git-Tag: tevent-0.9.15~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b9299310fdce8d4298089bf67cafd6e9e748ec2;p=thirdparty%2Fsamba.git loadparm: fix a load of uninitialized memory errors found by valgrind. --- diff --git a/lib/util/params.c b/lib/util/params.c index 45fcd5bdc83..3f1d5359992 100644 --- a/lib/util/params.c +++ b/lib/util/params.c @@ -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));