* Fix memory leak in cases where XMP parsing fails.
This commit is contained in:
parent
cfe45db393
commit
310f928fab
@ -345,7 +345,10 @@ image_get_jpeg_date_xmp(const char * path, char ** date)
|
||||
ParseNameValue(data, offset, &xml);
|
||||
exif = GetValueFromNameValueList(&xml, "DateTimeOriginal");
|
||||
if( !exif )
|
||||
{
|
||||
ClearNameValueList(&xml);
|
||||
break;
|
||||
}
|
||||
*date = realloc(*date, strlen(exif)+1);
|
||||
strcpy(*date, exif);
|
||||
ClearNameValueList(&xml);
|
||||
|
Loading…
x
Reference in New Issue
Block a user