Skip to content

Commit

Permalink
Config: Bugfix, always initialize cfgfile string
Browse files Browse the repository at this point in the history
  • Loading branch information
Zirias committed Jul 26, 2024
1 parent ae12b21 commit d7ac807
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/bin/xmoji/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,7 @@ static char *canonicalpath(const char *path)
Config *Config_create(const char *path)
{
Config *self = PSC_malloc(sizeof *self);
if (path)
{
self->cfgfile = canonicalpath(path);
}
self->cfgfile = path ? canonicalpath(path) : 0;
if (!self->cfgfile)
{
const char *home = getenv("XDG_CONFIG_HOME");
Expand Down

0 comments on commit d7ac807

Please sign in to comment.