Commit b1d4cd19 authored by Rémi Duraffort's avatar Rémi Duraffort

xdg: fix infinite loop if the file is invalid

parent 8efb3b63
...@@ -181,10 +181,11 @@ static char *config_GetTypeDir (const char *xdg_name) ...@@ -181,10 +181,11 @@ static char *config_GetTypeDir (const char *xdg_name)
{ {
free (path); free (path);
path = NULL; path = NULL;
continue; break;
} }
*(out++) = *(ptr++); *(out++) = *(ptr++);
} }
if (path != NULL)
*out = '\0'; *out = '\0';
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment