imagex_mount_rw_or_ro(): Free additional_swms when done
authorEric Biggers <ebiggers3@gmail.com>
Mon, 12 Nov 2012 20:51:29 +0000 (14:51 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 12 Nov 2012 20:51:29 +0000 (14:51 -0600)
programs/imagex.c

index 979ef76f82212d885ea78638477e15190f6438ad..7c0252db05ad30d0217faedca43cecc3b1d597e1 100644 (file)
@@ -1264,9 +1264,11 @@ static int imagex_mount_rw_or_ro(int argc, const char **argv)
        }
 out:
        wimlib_free(w);
-       if (additional_swms)
+       if (additional_swms) {
                for (unsigned i = 0; i < num_additional_swms; i++)
                        wimlib_free(additional_swms[i]);
+               free(additional_swms);
+       }
        return ret;
 mount_usage:
        usage((mount_flags & WIMLIB_MOUNT_FLAG_READWRITE)