diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2024-12-26 16:01:55 +0100 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2024-12-26 16:25:18 +0100 |
commit | 22c44d49c74e48914bed89d8526af30ab43e1700 (patch) | |
tree | 7eee1cf6a46d1171e7d636da38c90043cb4211f9 /file.c | |
parent | 016992ad866767edd93e2673c1c31dccd6cc2fc7 (diff) |
browse: fix memory leak
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -138,7 +138,7 @@ file_get_basename(const struct file * f) /* is the path a basename itself? */ if (strrchr(f->path, '/') == NULL) - return f->path; + return strdup(f->path); /* get the basename */ return str_tail(f->path, '/'); |