tmp_append_path freed too soon

This commit is contained in:
twinaphex 2017-09-10 01:03:26 +02:00
parent 5abf4b277e
commit 14f57cad78

View File

@ -2264,8 +2264,6 @@ static bool config_load_file(const char *path, bool set_defaults,
path_size); path_size);
extra_path = strtok_r(tmp_append_path, "|", &save); extra_path = strtok_r(tmp_append_path, "|", &save);
free(tmp_append_path);
while (extra_path) while (extra_path)
{ {
bool ret = config_append_file(conf, extra_path); bool ret = config_append_file(conf, extra_path);
@ -2276,6 +2274,8 @@ static bool config_load_file(const char *path, bool set_defaults,
RARCH_ERR("Config: failed to append config \"%s\"\n", extra_path); RARCH_ERR("Config: failed to append config \"%s\"\n", extra_path);
extra_path = strtok_r(NULL, "|", &save); extra_path = strtok_r(NULL, "|", &save);
} }
free(tmp_append_path);
} }
#if 0 #if 0