From 18ce5844dfbce0526b9a779789d6c152d5e959be Mon Sep 17 00:00:00 2001 From: William Bader Date: Sat, 23 May 2026 22:20:58 -0400 Subject: [PATCH] xvexif.c ExifComment(): Call exif_data_free() to fix memory leak. --- src/xvexif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xvexif.c b/src/xvexif.c index 7016b47..e90aa16 100644 --- a/src/xvexif.c +++ b/src/xvexif.c @@ -51,12 +51,14 @@ char* ExifComment(char* comment) { char* fullComment = malloc(size); if (fullComment == NULL) { fprintf(stderr, "could not allocate memory for exif comment\n"); + exif_data_free(exifData); return NULL; } strcpy(fullComment, comment ? comment : ""); strcat(fullComment, exifTitle); exif_data_foreach_content(exifData, exifAddContent, fullComment); + exif_data_free(exifData); return fullComment; }