free comment (Coverity)

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14639 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2014-01-05 20:34:00 +00:00
parent aee0c68e3b
commit 1efcd217fb

View File

@@ -447,7 +447,10 @@ unsigned char *gpi_exif_get_thumbnail_and_size(exifparser *exifdat, long *size)
gpi_exif_get_field( EXIF_Model, -1, exifdat, &owner);
printf("Camera model: %s\n",owner.data);
printf("Comment for this picture (%d chars)",gpi_exif_get_comment( exifdat, &comment));
if (comment) printf(" -> %s\n",comment);
if (comment) {
printf(" -> %s\n",comment);
free(comment);
}
gpi_exif_get_field( EXIF_SubjectDistance, 2, exifdat, &owner);
/* dump_exif(exifdat); */
}