Avoid null dereference in argv_free
1 files changed, 3 insertions(+), 0 deletions(-) M builtin/set.c
M builtin/set.c => builtin/set.c +3 -0
@@ 74,6 74,9 @@ static char **argv_dup(char *argv_0, int argc, char *argv[]) { } static void argv_free(int argc, char **argv) { + if (!argv) { + return; + } for (int i = 0; i < argc; ++i) { free(argv[i]); }