summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-29 15:30:45 +0200
committerMichael Adam <obnox@samba.org>2008-04-30 12:42:32 +0200
commit411ae73283f2479544fe687d196910e809ad83b0 (patch)
tree178ffc9bfd7d5d5b35bd91fcd39e6977ef27baf5
parentdba75c083179dd2721fc86291749e02331e9cbc3 (diff)
downloadsamba-411ae73283f2479544fe687d196910e809ad83b0.tar.gz
samba-411ae73283f2479544fe687d196910e809ad83b0.tar.bz2
samba-411ae73283f2479544fe687d196910e809ad83b0.zip
registry: combine talloc_strdup() and normalize_reg_path() in regdb_fetch_keys().
the talloc_strdup() call is just and extra allocation here. Michael (This used to be commit 217233349b2d98d2506fcca47858373150e89924)
-rw-r--r--source3/registry/reg_backend_db.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 6bd8d375fb..31ada0c85c 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -733,13 +733,7 @@ int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr)
DEBUG(11,("regdb_fetch_keys: Enter key => [%s]\n", key ? key : "NULL"));
- path = talloc_strdup(frame, key);
- if (!path) {
- goto fail;
- }
-
- /* convert to key format */
- path = normalize_reg_path(frame, path);
+ path = normalize_reg_path(frame, key);
if (!path) {
goto fail;
}