Skip to content
Permalink
Browse files

free() some variables in the moar runner

The `free()` was called after the program exited thus without effect.
The frees aren't really necessary as the program is exiting anyways, but
helps to not flood some debugging tools with meaningless warnings.
  • Loading branch information...
patzim committed Apr 27, 2019
1 parent 4e677f0 commit 34162e967161f34755fbe710614345c1448d48b5
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/vm/moar/runner/main.c
@@ -347,14 +347,6 @@ int wmain(int argc, wchar_t *wargv[])
}
#endif

if (full_cleanup) {
MVM_vm_destroy_instance(instance);
return EXIT_SUCCESS;
}
else {
MVM_vm_exit(instance);
}

free(lib_path[0]);
free(lib_path[1]);
free(lib_path[2]);
@@ -363,4 +355,12 @@ int wmain(int argc, wchar_t *wargv[])
free(dir_path);
free(perl6_home);
free(nqp_home);

if (full_cleanup) {
MVM_vm_destroy_instance(instance);
return EXIT_SUCCESS;
}
else {
MVM_vm_exit(instance);
}
}

0 comments on commit 34162e9

Please sign in to comment.
You can’t perform that action at this time.