diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-09-28 06:44:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:20:25 -0500 |
commit | 318682b00377605a26d0b7fd4b59713c6c429b81 (patch) | |
tree | 5ad527e7dc49b4711e4a4a7aa0ee007d2eaf18ed /source4/lib/registry/common | |
parent | 2550f5ae126bf33148dabf30ae97b6d6d82e30a0 (diff) | |
download | samba-318682b00377605a26d0b7fd4b59713c6c429b81.tar.gz samba-318682b00377605a26d0b7fd4b59713c6c429b81.tar.bz2 samba-318682b00377605a26d0b7fd4b59713c6c429b81.zip |
r18971: avoid strndup is a few places. Fixes a minor memory leak, and should
fix RPC-LSA on AIX.
(This used to be commit 6cce709d08579f4e00b44b692332a557b0ea3b86)
Diffstat (limited to 'source4/lib/registry/common')
-rw-r--r-- | source4/lib/registry/common/reg_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/registry/common/reg_util.c b/source4/lib/registry/common/reg_util.c index 3d0cdf5a6a..a8d7accb3d 100644 --- a/source4/lib/registry/common/reg_util.c +++ b/source4/lib/registry/common/reg_util.c @@ -171,9 +171,9 @@ WERROR reg_open_key_abs(TALLOC_CTX *mem_ctx, struct registry_context *handle, co if(strchr(name, '\\')) predeflength = strchr(name, '\\')-name; else predeflength = strlen(name); - predefname = strndup(name, predeflength); + predefname = talloc_strndup(mem_ctx, name, predeflength); error = reg_get_predefined_key_by_name(handle, predefname, &predef); - SAFE_FREE(predefname); + talloc_free(predefname); if(!W_ERROR_IS_OK(error)) { return error; |