]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
loadparm: Fix memory leak issue.
authorHemanth Thummala <hemanth.thummala@nutanix.com>
Tue, 2 Feb 2016 18:33:20 +0000 (10:33 -0800)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 4 Feb 2016 11:39:14 +0000 (12:39 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11708

Signed-off-by: Hemanth Thummala <hemanth.thummala@nutanix.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb  4 12:39:14 CET 2016 on sn-devel-144

source3/param/loadparm.c

index 31d9e2ddb3a86f6ec72aa94d064bd09b14569b4b..fb92230ffbaf3861374b186fbb90c2c8f6cce683 100644 (file)
@@ -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);