summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-10-23 15:12:01 +0200
committerStefan Metzmacher <metze@samba.org>2009-10-24 11:59:15 +0200
commit4ab83fb1b7d2929c6ae454f3f073d4baf3510ca3 (patch)
treebda714f26e50354b0a3e23b38f72c384b5389e8a /source4/param
parent69e96f08f1def1c28abe928ccbb0717566e49c8c (diff)
downloadsamba-4ab83fb1b7d2929c6ae454f3f073d4baf3510ca3.tar.gz
samba-4ab83fb1b7d2929c6ae454f3f073d4baf3510ca3.tar.bz2
samba-4ab83fb1b7d2929c6ae454f3f073d4baf3510ca3.zip
s4:loadparm: don't leak the names of all shares in each lp_service() call
metze
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 882de1330e..669e0d7d22 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2609,8 +2609,11 @@ struct loadparm_service *lp_service(struct loadparm_context *lp_ctx,
serviceName = standard_sub_basic(
lp_ctx->services[iService],
lp_ctx->services[iService]->szService);
- if (strequal(serviceName, service_name))
+ if (strequal(serviceName, service_name)) {
+ talloc_free(serviceName);
return lp_ctx->services[iService];
+ }
+ talloc_free(serviceName);
}
}