]> wimlib.net Git - wimlib/blobdiff - src/security.c
Extract NTFS junction points correctly
[wimlib] / src / security.c
index ccca9624121e5beb370d30748b63a8cf96e7cee3..bc44b45ae9d3707dea3fe6fb670e47d5c3d326f6 100644 (file)
@@ -267,8 +267,8 @@ void free_security_data(struct wim_security_data *sd)
 {
        if (!sd)
                return;
-       wimlib_assert(sd->refcnt >= 1);
-       if (sd->refcnt == 1) {
+       wimlib_assert(sd->refcnt != 0);
+       if (--sd->refcnt == 0) {
                u8 **descriptors = sd->descriptors;
                u32 num_entries  = sd->num_entries;
                if (descriptors)
@@ -277,7 +277,5 @@ void free_security_data(struct wim_security_data *sd)
                FREE(sd->sizes);
                FREE(sd->descriptors);
                FREE(sd);
-       } else {
-               sd->refcnt--;
        }
 }