File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ int main(int argc, char *argv[])
2020 UnpackContext * unpack_ctx = NULL ;
2121 OperationModes op_modes = 0 ;
2222 const char * extract_dir = NULL ;
23+ char * image_path = NULL ;
2324
2425 /*
2526 Initialize signal and control handling so the parent process remains
@@ -34,8 +35,8 @@ int main(int argc, char *argv[])
3435 }
3536
3637 /* Find name of image */
37- char * image_path = GetImagePath ();
38- if (image_path == NULL ) {
38+ image_path = GetImagePath ();
39+ if (! image_path ) {
3940 FATAL ("Failed to get executable name" );
4041 goto cleanup ;
4142 }
@@ -116,6 +117,10 @@ int main(int argc, char *argv[])
116117 Cleanup failures are non-critical and logged as DEBUG only.
117118 */
118119
120+ if (image_path ) {
121+ free (image_path );
122+ }
123+
119124 if (unpack_ctx ) {
120125 ClosePackFile (unpack_ctx );
121126 unpack_ctx = NULL ;
You can’t perform that action at this time.
0 commit comments