hibernate-resume-generator: fix minor memory leak on error path

This commit is contained in:
Lennart Poettering
2018-11-15 22:29:23 +01:00
parent a0e1f0c164
commit 7dcb6ef06f

View File

@@ -95,10 +95,13 @@ int main(int argc, char *argv[]) {
if (arg_noresume) {
log_notice("Found \"noresume\" on the kernel command line, quitting.");
return EXIT_SUCCESS;
r = 0;
goto finish;
}
r = process_resume();
finish:
free(arg_resume_device);
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;