imagex_info(): Do not leak WIMStruct when file not writable
authorEric Biggers <ebiggers3@gmail.com>
Sun, 28 Apr 2013 22:33:08 +0000 (17:33 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 28 Apr 2013 22:33:08 +0000 (17:33 -0500)
programs/imagex.c

index c1f4217..0bba354 100644 (file)
@@ -2077,7 +2077,7 @@ imagex_info(int argc, tchar **argv)
 
                        ret = file_writable(wimfile);
                        if (ret != 0)
 
                        ret = file_writable(wimfile);
                        if (ret != 0)
-                               return ret;
+                               goto out;
 
                        if (check)
                                write_flags = WIMLIB_WRITE_FLAG_CHECK_INTEGRITY;
 
                        if (check)
                                write_flags = WIMLIB_WRITE_FLAG_CHECK_INTEGRITY;