From a299de85ab6f1901a61d696522522496fb154434 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 16 Oct 2013 21:52:29 +0200 Subject: [PATCH] loadparm: use lp_printername ctx param instead of tos lp_printername() takes a TALLOC_CTX argument, but proceeds to use talloc_tos() in a subsequent lp__printername call. Fix it to use the parameter - most callers use talloc_tos() as the argument, the others have a temporary context around. Signed-off-by: David Disseldorp Reviewed-by: Guenther Deschner --- 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 d3fb839897a..1396a344459 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -5274,7 +5274,7 @@ void lp_copy_service(int snum, const char *new_name) const char *lp_printername(TALLOC_CTX *ctx, int snum) { - const char *ret = lp__printername(talloc_tos(), snum); + const char *ret = lp__printername(ctx, snum); if (ret == NULL || *ret == '\0') { ret = lp_const_servicename(snum); }