mirror of
https://github.com/Motion-Project/motion.git
synced 2026-05-04 04:43:07 -04:00
Revise free process to close leaks
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user