summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-11-01 13:12:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:10 -0500
commit722eec5fc0556abf115a02a531fcc0e31a213062 (patch)
treeca656eec98ecfaea81dc332de01c6dfa3a470c69 /source4/librpc
parent83899037dcb87cb1d49373bfd1a8edb464adbc55 (diff)
downloadsamba-722eec5fc0556abf115a02a531fcc0e31a213062.tar.gz
samba-722eec5fc0556abf115a02a531fcc0e31a213062.tar.bz2
samba-722eec5fc0556abf115a02a531fcc0e31a213062.zip
r3434: Fix memleak
(This used to be commit 0a12cc4cadf7c1e97282a0d8ab2f486536987a77)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index c484a2618c..55818e28fe 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -185,7 +185,7 @@ static const struct {
*/
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 @@ const char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_bindi
}
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);