projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51eb86d
)
src/bin/jpwl/convert.c: fix memleak (fix suggested by maddin200, #631)
author
Even Rouault
<even.rouault@spatialys.com>
Sat, 29 Jul 2017 19:11:23 +0000
(21:11 +0200)
committer
Even Rouault
<even.rouault@spatialys.com>
Sat, 29 Jul 2017 19:11:23 +0000
(21:11 +0200)
src/bin/jpwl/convert.c
patch
|
blob
|
history
diff --git
a/src/bin/jpwl/convert.c
b/src/bin/jpwl/convert.c
index cf06b5137ea51fa7ed98126d46e6307065e95c89..8650ae9c406396f2d492a07f695394fccb134617 100644
(file)
--- a/
src/bin/jpwl/convert.c
+++ b/
src/bin/jpwl/convert.c
@@
-129,6
+129,7
@@
static int tga_readheader(FILE *fp, unsigned int *bits_per_pixel,
if (fread(tga, TGA_HEADER_SIZE, 1, fp) != 1) {
fprintf(stderr,
"\nError: fread return a number of element different from the expected.\n");
+ free(tga);
return 0 ;
}
id_len = (unsigned char)tga[0];