diff options
Diffstat (limited to 'source4/lib')
-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; |