Merge pull request #143 from liuchao173/patch-5

free polscript if irqbalance exit
This commit is contained in:
Neil Horman 2019-12-03 06:45:12 -05:00 committed by GitHub
commit 42c3e061ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,6 +153,7 @@ static void parse_command_line(int argc, char **argv)
add_cl_banned_irq((int)val); add_cl_banned_irq((int)val);
break; break;
case 'l': case 'l':
free(polscript);
polscript = strdup(optarg); polscript = strdup(optarg);
break; break;
case 'm': case 'm':
@ -702,6 +703,7 @@ int main(int argc, char** argv)
out: out:
free_object_tree(); free_object_tree();
free_cl_opts(); free_cl_opts();
free(polscript);
/* Remove pidfile */ /* Remove pidfile */
if (!foreground_mode && pidfile) if (!foreground_mode && pidfile)