aboutsummaryrefslogtreecommitdiffstats
path: root/fm.c
diff options
context:
space:
mode:
authorverdant <im@verdant.ee>2026-07-25 17:12:52 +0800
committerverdant <im@verdant.ee>2026-07-25 20:25:22 +0800
commita988bc1eb3c0dbc0ce3ccd0f3422a459a9e61295 (patch)
tree8a6d71bc18b90ae4ac9f3649efa4de5202afe072 /fm.c
parentd18ee4ae5ae750ce46fa81e2689dc995037b414f (diff)
downloadsf-a988bc1eb3c0dbc0ce3ccd0f3422a459a9e61295.tar.gz
sf-a988bc1eb3c0dbc0ce3ccd0f3422a459a9e61295.zip
Fix use-after-free of pointer "buf"
Diffstat (limited to 'fm.c')
-rw-r--r--fm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fm.c b/fm.c
index c5c5b30..f6a7bfd 100644
--- a/fm.c
+++ b/fm.c
@@ -198,9 +198,8 @@ static char *fm_print_preview_content(window *w, const char *path)
}
free(buf);
- return buf;
}
-static void *fm_preview_file(fm_info *i)
+static void fm_preview_file(fm_info *i)
{
wclear(i->fm_r->win);
char *path = xmalloc(sizeof(char) * PATH_MAX);