svn commit: samba r3434 - in branches/SAMBA_4_0/source/librpc/rpc: .

vlendec at samba.org vlendec at samba.org
Mon Nov 1 13:12:10 GMT 2004


Author: vlendec
Date: 2004-11-01 13:12:09 +0000 (Mon, 01 Nov 2004)
New Revision: 3434

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3434

Log:
Fix memleak
Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c	2004-11-01 12:57:51 UTC (rev 3433)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c	2004-11-01 13:12:09 UTC (rev 3434)
@@ -185,7 +185,7 @@
 */
 const char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b)
 {
-	char *s = NULL;
+	char *s = talloc_strdup(mem_ctx, "");
 	int i;
 	const char *t_name=NULL;
 
@@ -199,7 +199,8 @@
 	}
 
 	if (!uuid_all_zero(&b->object)) { 
-		s = talloc_asprintf(mem_ctx, "%s@", GUID_string(mem_ctx, &b->object));
+		s = talloc_asprintf(s, "%s@",
+				    GUID_string(mem_ctx, &b->object));
 	}
 
 	s = talloc_asprintf_append(s, "%s:", t_name);



More information about the samba-cvs mailing list