]> wimlib.net Git - wimlib/blobdiff - src/security.c
NTFS apply updates
[wimlib] / src / security.c
index c6bbf7cb48908b876b18e3b5e47c3898aaa5769b..bc44b45ae9d3707dea3fe6fb670e47d5c3d326f6 100644 (file)
@@ -28,8 +28,6 @@
 #include "io.h"
 #include "security.h"
 
-#ifdef ENABLE_SECURITY_DATA
-
 /* 
  * Reads the security data from the metadata resource.
  *
@@ -269,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)
@@ -279,9 +277,5 @@ void free_security_data(struct wim_security_data *sd)
                FREE(sd->sizes);
                FREE(sd->descriptors);
                FREE(sd);
-       } else {
-               sd->refcnt--;
        }
 }
-
-#endif