From aea50e655fed8d60d87e4056420a6716b3e645da Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 10 May 2007 06:48:48 +0000 Subject: [PATCH] added 2 missing free()s (CID 65) git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10161 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/digita/digita.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/camlibs/digita/digita.c b/camlibs/digita/digita.c index a958830a3..5bda74679 100644 --- a/camlibs/digita/digita.c +++ b/camlibs/digita/digita.c @@ -241,6 +241,7 @@ static unsigned char *digita_file_get(Camera *camera, const char *folder, if (digita_get_file_data(camera->pl, thumbnail, &fn, &tag, data) < 0) { GP_DEBUG( "digita_get_picture: digita_get_file_data failed"); + free (data); return NULL; } @@ -268,6 +269,7 @@ static unsigned char *digita_file_get(Camera *camera, const char *folder, if (digita_get_file_data(camera->pl, thumbnail, &fn, &tag, data + pos) < 0) { GP_DEBUG ("digita_get_file_data failed."); + free (data); return NULL; } pos += ntohl(tag.length);