registry: free temporary data in regdb_fetch_key_internal().
authorMichael Adam <obnox@samba.org>
Tue, 6 May 2008 15:15:50 +0000 (17:15 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 8 May 2008 16:29:08 +0000 (18:29 +0200)
Michael

source/registry/reg_backend_db.c

index 638d9b144c31ff89a97ad3c12c01285eea226094..d1ec8e4b61a61670960ab365866cb2f788abadc2 100644 (file)
@@ -756,13 +756,17 @@ fail:
 static TDB_DATA regdb_fetch_key_internal(TALLOC_CTX *mem_ctx, const char *key)
 {
        char *path = NULL;
+       TDB_DATA data;
 
        path = normalize_reg_path(mem_ctx, key);
        if (!path) {
                return make_tdb_data(NULL, 0);
        }
 
-       return dbwrap_fetch_bystring(regdb, mem_ctx, path);
+       data = dbwrap_fetch_bystring(regdb, mem_ctx, path);
+
+       TALLOC_FREE(path);
+       return data;
 }