Revise free process to close leaks

This commit is contained in:
MrDave
2021-03-24 21:10:14 -06:00
committed by Mr-Dave
parent 2efae0227b
commit fb3a6fb079
13 changed files with 378 additions and 103 deletions

View File

@@ -345,7 +345,10 @@ unsigned exif_prepare(unsigned char **exif, const struct ctx_cam *cam,
/* assert we didn't underestimate the original buffer size */
assert(marker_len <= buffer_size);
util_free_var(description);
if (description != NULL) {
free(description);
}
description = NULL;
*exif = marker;
return marker_len;