s3:utils/profiles fix a use after free
[samba.git] / source3 / utils / profiles.c
index 30c6ad0a1fb9dc2b6c47381cb2ea6fd7152b2291..a88469a919269a7751d52605e1b163c3537d3235 100644 (file)
@@ -182,12 +182,12 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
                }
        }
 
-       /* values is a talloc()'d child of subkeys here so just throw it all away */
-
-       TALLOC_FREE( subkeys );
 
        verbose_output("[%s]\n", path);
 
+       /* values is a talloc()'d child of subkeys here so just throw it all away */
+       TALLOC_FREE(subkeys);
+
        return True;
 }