summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_util.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-28 19:03:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:03 -0500
commit3e7203d0b34a031e10aeaaf04f246a1de8376ab4 (patch)
treecb3b6303112f2b945650b2a778d2eb32cbba3e59 /source4/librpc/rpc/dcerpc_util.c
parent53d10b44faa77293e380bd1cda6168acc05a5493 (diff)
downloadsamba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.tar.gz
samba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.tar.bz2
samba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.zip
r24755: Use common code for finding the RPC binding in the torture tests.
(This used to be commit e3310e773924ddd2129e8ca1a86e23d0f713c19c)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_util.c')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index e1fb4c1d86..f097e53f20 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -301,7 +301,7 @@ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b)
NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out)
{
struct dcerpc_binding *b;
- char *options, *type;
+ char *options;
char *p;
int i, j, comma_count;
@@ -334,7 +334,7 @@ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_
if (p == NULL) {
b->transport = NCA_UNKNOWN;
} else {
- type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s));
+ char *type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s));
if (!type) {
return NT_STATUS_NO_MEMORY;
}
@@ -350,6 +350,8 @@ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_
DEBUG(0,("Unknown dcerpc transport '%s'\n", type));
return NT_STATUS_INVALID_PARAMETER;
}
+
+ talloc_free(type);
s = p+1;
}