diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2016-02-06 16:38:27 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2016-02-06 16:38:27 +0100 |
commit | 3397efba1c9dabfe4d88c6ecbe818a92dc2563bc (patch) | |
tree | 3235a87dc3213aa9ba011af6490a253f1ffdc667 | |
parent | 96e6b4a8eb8420edacb8348b7f88ee1cecefb972 (diff) | |
download | libgphoto2-3397efba1c9dabfe4d88c6ecbe818a92dc2563bc.tar.gz |
added a missing free (pic_buffer) in error node (Coverity)
1033343 Resource leak
-rw-r--r-- | camlibs/jl2005c/library.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/camlibs/jl2005c/library.c b/camlibs/jl2005c/library.c index 046a4bfb3..1c31590e7 100644 --- a/camlibs/jl2005c/library.c +++ b/camlibs/jl2005c/library.c @@ -387,8 +387,10 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, } else if (type == GP_FILE_TYPE_NORMAL) { outputsize = 3 * w * h + 256; pic_output = calloc(outputsize, 1); - if (!pic_output) + if (!pic_output) { + free (pic_buffer); return GP_ERROR_NO_MEMORY; + } outputsize = jl2005bcd_decompress(pic_output, pic_buffer, b + 16, 0); free (pic_buffer); |