NB: If we are going to exit data_thread_script function due to malloc
failure or fread failure, then we should close the previously fdopen'd
file so that we do not leak 'f'.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
sc->tmpo);
sc->errstr = strdup(buf);
free(dat);
+ fclose(f);
return;
}
snprintf(buf, sizeof(buf), "edje/scripts/embryo/compiled/%i",
snprintf(buf, sizeof(buf),
"Alloc failed for %lu bytes", (unsigned long)size);
sc->errstr = strdup(buf);
+ fclose(f);
return;
}
}