]> wimlib.net Git - wimlib/commitdiff
read_metadata_resource(): Don't decrement stream refcnts in error path
authorEric Biggers <ebiggers3@gmail.com>
Tue, 14 Jan 2014 20:46:18 +0000 (14:46 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 14 Jan 2014 20:46:18 +0000 (14:46 -0600)
If a metadata resource could not be fully read, the code would decrement
the reference counts of streams referenced by the tree.  However this
should not be done, as there is no corresponding increment.

src/metadata_resource.c

index 9cd86f9e0fd96e6ef0647407894b98c823933401..f9401d011e71812ae1f30214437bbb2fc6458494 100644 (file)
@@ -184,7 +184,7 @@ out_success:
        ret = 0;
        goto out_free_buf;
 out_free_dentry_tree:
        ret = 0;
        goto out_free_buf;
 out_free_dentry_tree:
-       free_dentry_tree(root, wim->lookup_table);
+       free_dentry_tree(root, NULL);
 out_free_security_data:
        free_wim_security_data(security_data);
 out_free_buf:
 out_free_security_data:
        free_wim_security_data(security_data);
 out_free_buf: