From af8ddd16367bc3cdc67b89f9484251834303471b Mon Sep 17 00:00:00 2001 From: Hemanth Thummala Date: Tue, 2 Feb 2016 10:33:20 -0800 Subject: [PATCH] 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 (cherry picked from commit 8247d93701ed838190fe74044a63a56d63d37bf5) --- source3/param/loadparm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 31d9e2d..fb92230 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); -- 2.7.0.rc3.207.g0ac5344