Skip to content

Commit

Permalink
Fix stupid free bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Mar 23, 2024
1 parent ee0a862 commit 6e5681d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bsd/restartable.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ safe_arg(const char *arg) {
static void
print_argv(pid_t pid) {
char **argv = kinfo_getargv(pid);
char **argvp = argv;

if (argv == NULL) {
warn("%d: kinfo_getargv", pid);
Expand All @@ -93,7 +94,7 @@ print_argv(pid_t pid) {
} while (*++argv);
printf("\n");

free_argv(argv);
free_argv(argvp);
}

static void
Expand Down

0 comments on commit 6e5681d

Please sign in to comment.