From 678468e3632eea69cd9720432cc4905a6eaa0cc7 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Tue, 6 Aug 2024 23:08:19 +0300 Subject: [PATCH] main.c: my_basename: free `path` after using --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index f571b91..b61f960 100644 --- a/src/main.c +++ b/src/main.c @@ -119,6 +119,8 @@ static char* my_basename(const char* raw_path) { memcpy(base, last_slash + 1, fname_len); base[fname_len] = '\0'; + free(path); + return base; }