Skip to content

Commit

Permalink
sigsegv after cli_free_command
Browse files Browse the repository at this point in the history
  • Loading branch information
rjokl committed Jun 19, 2024
1 parent dcfd3b7 commit 30e0c36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ static void cli_free_command(struct cli_def *cli, struct cli_command *cmd) {
if (cmd->next) {
cmd->next->previous = cmd->previous;
}
if (cmd->parent && cmd == cmd->parent->children) {
cmd->parent->children = cmd->next;
}
}
free(cmd);
}
Expand Down

0 comments on commit 30e0c36

Please sign in to comment.