Patch

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Jan 24 12:51:02 MST 2013


Hi!

If someone feels like it, please review and push to master.

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

**********************************************************
visit us at CeBIT: March 5th - 9th 2013, hall 6, booth E15
all about SAMBA and verinice, firewalls, Linux and Windows
free tickets available via email here : cebit at sernet.com !
**********************************************************
-------------- next part --------------
From 1ab8a92081f3804cfe9e32c136474d92a5ace213 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 24 Jan 2013 16:39:05 +0100
Subject: [PATCH] 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
---
 source3/lib/util.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/source3/lib/util.c b/source3/lib/util.c
index 5ffce58..e0cae91 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);
 }
 
 /**
-- 
1.7.9.5



More information about the samba-technical mailing list