]> wimlib.net Git - wimlib/commitdiff
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 c1f4217ee844de4daab6a75940392fca913ffef2..0bba3546bd55a8c7fc381f63cafa8d196b2477e3 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;