Browse Source

fix a memory leak

master
tth 2 years ago
parent
commit
cd1f278d45
  1. 4
      lib/fimg-core.c

4
lib/fimg-core.c

@ -167,6 +167,10 @@ if (NULL == fimg->R) { @@ -167,6 +167,10 @@ if (NULL == fimg->R) {
free(fimg->R);
if (FIMG_TYPE_RGB==fimg->type) {
free(fimg->G);
free(fimg->B);
}
memset(fimg, 0, sizeof(FloatImg));
return 0;

Loading…
Cancel
Save