diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-01-04 18:30:51 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-01-04 18:30:51 +0100 |
commit | 253fd059e8c5268651971978f6078db06b48e03a (patch) | |
tree | ac6bcd8b0ba4fce121104bb5cc1020a46897433b | |
parent | ec3fbb92addf07c8af74909331e89e60f83002bc (diff) | |
download | libgphoto2-253fd059e8c5268651971978f6078db06b48e03a.tar.gz |
avcoid memory leak (Coverity)
-rw-r--r-- | camlibs/jl2005a/library.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/camlibs/jl2005a/library.c b/camlibs/jl2005a/library.c index 6ce92ab6f..80a2e3e7a 100644 --- a/camlibs/jl2005a/library.c +++ b/camlibs/jl2005a/library.c @@ -242,12 +242,14 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, if (compressed) { /* compressed seems to mean half the lines */ if (w/2*h > b+14) { + free(p_data); status = GP_ERROR_CORRUPTED_DATA; goto end; } jl2005a_decompress (image_start, p_data, w, h); } else { if (w*h > b+14) { + free(p_data); status = GP_ERROR_CORRUPTED_DATA; goto end; } |