From 4570bf7609546cea728cf37dcefbd22a3c3b4a35 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sun, 7 Jul 2024 19:49:01 +0300 Subject: [PATCH] main.c: function `my_basename`: also return NULL on error --- src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index 4135dcf..2b59871 100644 --- a/src/main.c +++ b/src/main.c @@ -93,6 +93,7 @@ static char* my_basename(const char* raw_path) { free(path); PERROR_MACRO("malloc"); exit(EXIT_FAILURE); + return NULL; } size_t fname_len = strlen(path);