diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-11-01 13:12:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:10 -0500 |
commit | 722eec5fc0556abf115a02a531fcc0e31a213062 (patch) | |
tree | ca656eec98ecfaea81dc332de01c6dfa3a470c69 | |
parent | 83899037dcb87cb1d49373bfd1a8edb464adbc55 (diff) | |
download | samba-722eec5fc0556abf115a02a531fcc0e31a213062.tar.gz samba-722eec5fc0556abf115a02a531fcc0e31a213062.tar.bz2 samba-722eec5fc0556abf115a02a531fcc0e31a213062.zip |
r3434: Fix memleak
(This used to be commit 0a12cc4cadf7c1e97282a0d8ab2f486536987a77)
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 5 |
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); |