Commit 66fb4bc4 authored by Tobias Stoeckmann's avatar Tobias Stoeckmann Committed by derf
Browse files

Fix memory leak on error path

The snprintf string argument should not be duplicated.
It is not needed and also not released afterwards.
parent a426af80
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;