summaryrefslogtreecommitdiff
path: root/camlibs/konica
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2016-02-06 16:10:48 +0100
committerMarcus Meissner <marcus@jet.franken.de>2016-02-06 16:10:48 +0100
commit322dcdeac4fffbcf769a76a78da7bfb208fb42d4 (patch)
treecea6504ef41d201d0bb2097c97c6568beb649658 /camlibs/konica
parent04c78455361d9503045d9d14a606d24868d76771 (diff)
downloadlibgphoto2-322dcdeac4fffbcf769a76a78da7bfb208fb42d4.tar.gz
fixed leak on error case (Coverity)
296088 Resource leak
Diffstat (limited to 'camlibs/konica')
-rw-r--r--camlibs/konica/library.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/camlibs/konica/library.c b/camlibs/konica/library.c
index cb98352a8..370929ae1 100644
--- a/camlibs/konica/library.c
+++ b/camlibs/konica/library.c
@@ -1137,6 +1137,7 @@ localization_file_read (Camera *camera, const char *file_name,
if (sscanf ((char *)&c[0], "%X", &d) != 1) {
GP_DEBUG ("Error in localization "
"file.");
+ fclose (file);
return (GP_ERROR_CORRUPTED_DATA);
}
(*data)[*data_size] = d;
@@ -1145,7 +1146,7 @@ localization_file_read (Camera *camera, const char *file_name,
gp_context_error (context,
_("Localization file too long!"));
fclose (file);
- return (FALSE);
+ return (GP_ERROR_CORRUPTED_DATA);
}
}
j = 1 - j;