Commit c35ad202 authored by Bastien Nocera's avatar Bastien Nocera

mindtct: Fix a memory leak in morph_TF_map()

cimage is leaked when mimage fails to allocate.

Spotted by Seth Arnold

Closes: #82
parent 5e8b4a81
......@@ -675,6 +675,7 @@ int morph_TF_map(int *tfmap, const int mw, const int mh,
mimage = (unsigned char *)malloc(mw*mh);
if(mimage == (unsigned char *)NULL){
fprintf(stderr, "ERROR : morph_TF_map : malloc : mimage\n");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment