Fix segfault in config_parse_file

configfile is a `char *`. %s needs a `char *`, so we shouldn't
dereference the pointer here.

Closes: https://github.com/emersion/xdg-desktop-portal-wlr/issues/91
This commit is contained in:
Simon Ser 2021-03-04 20:10:50 +01:00 committed by danshick
parent 07154bb1e3
commit d3ac33a0aa

View file

@ -59,7 +59,7 @@ static char *config_path(char *prefix, char *filename) {
static void config_parse_file(const char *configfile, struct xdpw_config *config) { static void config_parse_file(const char *configfile, struct xdpw_config *config) {
dictionary *d = NULL; dictionary *d = NULL;
if (configfile) { if (configfile) {
logprint(INFO, "config: using config file %s", *configfile); logprint(INFO, "config: using config file %s", configfile);
d = iniparser_load(configfile); d = iniparser_load(configfile);
} else { } else {
logprint(INFO, "config: no config file found"); logprint(INFO, "config: no config file found");