mindtct: Fix leak in pixelize_map()
pmap was not freed in error cases. Spotted by Seth Arnold Closes: #83
This commit is contained in:
parent
21a779235d
commit
5e8b4a81e9
1 changed files with 2 additions and 0 deletions
|
@ -736,11 +736,13 @@ int pixelize_map(int **omap, const int iw, const int ih,
|
|||
}
|
||||
|
||||
if((ret = block_offsets(&blkoffs, &bw, &bh, iw, ih, 0, blocksize))){
|
||||
free(pmap);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
if((bw != mw) || (bh != mh)){
|
||||
free(blkoffs);
|
||||
free(pmap);
|
||||
fprintf(stderr,
|
||||
"ERROR : pixelize_map : block dimensions do not match\n");
|
||||
return(-591);
|
||||
|
|
Loading…
Reference in a new issue