mirror of https://github.com/nirenjan/libx52.git
Make sure config file is closed after dumping configuration
parent
38dfc7d7b0
commit
76b1b99717
|
@ -152,11 +152,13 @@ int x52d_config_save_file(struct x52d_config *cfg, const char *cfg_file)
|
||||||
if (rc) { \
|
if (rc) { \
|
||||||
PINELOG_ERROR(_("Failed to dump %s.%s to config file %s - code %d: %s"), \
|
PINELOG_ERROR(_("Failed to dump %s.%s to config file %s - code %d: %s"), \
|
||||||
#section, #key, cfg_file, rc, strerror(rc)); \
|
#section, #key, cfg_file, rc, strerror(rc)); \
|
||||||
return rc; \
|
goto exit_dump; \
|
||||||
} \
|
} \
|
||||||
} while (0);
|
} while (0);
|
||||||
#include "x52d_config.def"
|
#include "x52d_config.def"
|
||||||
|
|
||||||
return 0;
|
exit_dump:
|
||||||
|
fclose(cfg_fp);
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue