diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2016-02-06 16:10:48 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2016-02-06 16:10:48 +0100 |
commit | 322dcdeac4fffbcf769a76a78da7bfb208fb42d4 (patch) | |
tree | cea6504ef41d201d0bb2097c97c6568beb649658 /camlibs/konica | |
parent | 04c78455361d9503045d9d14a606d24868d76771 (diff) | |
download | libgphoto2-322dcdeac4fffbcf769a76a78da7bfb208fb42d4.tar.gz |
fixed leak on error case (Coverity)
296088 Resource leak
Diffstat (limited to 'camlibs/konica')
-rw-r--r-- | camlibs/konica/library.c | 3 |
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; |