From: Volker Lendecke Date: Thu, 24 Jan 2013 15:39:05 +0000 (+0100) Subject: Avoid a very small memleak on talloc_tos() X-Git-Tag: ldb-1.1.15~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da35cd7bd230b2299f9566f4775bd98fda3024f8;p=thirdparty%2Fsamba.git Avoid a very small memleak on talloc_tos() "fname" did leak on talloc_tos(). Not really a bad memleak, but as I just came across it I thought I might just fix it Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Jan 25 00:54:01 CET 2013 on sn-devel-104 --- diff --git a/source3/lib/util.c b/source3/lib/util.c index 5ffce583db4..e0cae91a0da 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1522,10 +1522,7 @@ static char *xx_path(const char *name, const char *rootpath) "Error was %s\n", fname, name, strerror(errno))); } - return talloc_asprintf(talloc_tos(), - "%s/%s", - fname, - name); + return talloc_asprintf_append(fname, "/%s", name); } /**