From: Hemanth Thummala Date: Tue, 2 Feb 2016 18:33:20 +0000 (-0800) Subject: loadparm: Fix memory leak issue. X-Git-Tag: tevent-0.9.27~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8247d93701ed838190fe74044a63a56d63d37bf5;p=thirdparty%2Fsamba.git loadparm: Fix memory leak issue. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11708 Signed-off-by: Hemanth Thummala Reviewed-by: Alexander Bokovoy Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Feb 4 12:39:14 CET 2016 on sn-devel-144 --- diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 31d9e2ddb3a..fb92230ffba 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1388,7 +1388,7 @@ static int add_a_service(const struct loadparm_service *pservice, const char *na return (-1); } ServicePtrs = tsp; - ServicePtrs[iNumServices] = talloc_zero(NULL, struct loadparm_service); + ServicePtrs[iNumServices] = talloc_zero(ServicePtrs, struct loadparm_service); if (!ServicePtrs[iNumServices]) { DEBUG(0,("add_a_service: out of memory!\n")); return (-1);