summaryrefslogtreecommitdiff
path: root/src/imlib.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2021-07-23 18:33:19 +0200
committerDaniel Friesel <derf@chaosdorf.de>2021-07-23 20:29:39 +0200
commit66fb4bc4a8f449d8065730a02049c0283c618e02 (patch)
tree6a5d877559df9dcbe9efd8c14a4bdb7281513e91 /src/imlib.c
parenta426af8058bc7982a0004e78ee833f61f5633a33 (diff)
Fix memory leak on error path
The snprintf string argument should not be duplicated. It is not needed and also not released afterwards.
Diffstat (limited to 'src/imlib.c')
-rw-r--r--src/imlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imlib.c b/src/imlib.c
index 5970bd2..ea2f49c 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -1166,7 +1166,7 @@ void feh_draw_exif(winwidget w)
if (buffer[0] == '\0')
{
- snprintf(buffer, EXIF_MAX_DATA, "%s", estrdup("Failed to run exif command"));
+ snprintf(buffer, EXIF_MAX_DATA, "%s", "Failed to run exif command");
gib_imlib_get_text_size(fn, buffer, NULL, &width, &height, IMLIB_TEXT_TO_RIGHT);
info_buf[no_lines] = estrdup(buffer);
no_lines++;