Fix potential FILE * leak in nvram_commit

arm-ng
edrikk 8 years ago committed by kille72
parent 49536f076f
commit ec8241afa6

@ -212,8 +212,10 @@ nvram_commit(void)
fp = fopen("/var/log/commit_ret", "w"); fp = fopen("/var/log/commit_ret", "w");
if ((ret = nvram_init(NULL))) if ((ret = nvram_init(NULL))) {
fclose(fp);
return ret; return ret;
}
ret = ioctl(nvram_fd, NVRAM_MAGIC, NULL); ret = ioctl(nvram_fd, NVRAM_MAGIC, NULL);

Loading…
Cancel
Save