Commit 73a2988e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ncurses: Remove use of xstrdup

parent df7a0f02
......@@ -294,7 +294,12 @@ static void ReadDir(intf_thread_t *intf)
continue;
dir_entry->file = IsFile(sys->current_dir, entry);
dir_entry->path = xstrdup(entry);
dir_entry->path = strdup(entry);
if (unlikely(dir_entry->path == NULL))
{
free(dir_entry);
continue;
}
TAB_APPEND(sys->n_dir_entries, sys->dir_entries, dir_entry);
continue;
}
......
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