oops, forgot some

This commit is contained in:
Palanix 2024-04-06 22:52:31 +02:00
parent 2b9849a9c5
commit 492a3511c5
No known key found for this signature in database
GPG key ID: 439CD6BD9905FAC5
2 changed files with 1 additions and 20 deletions

2
ccc.c
View file

@ -544,8 +544,6 @@ void populate_files(const char *path, int ftype)
add_file_stat(filename, path, ftype);
}
free(filename);
free(path);
}
if (ftype == 0) {
files = arraylist_init(tmp1->length + tmp2->length);

19
file.c
View file

@ -77,25 +77,8 @@ void arraylist_remove(ArrayList *list, long index)
*/
void arraylist_add(ArrayList *list, char *name, char *path, char *stats, char *type, wchar_t *icon, int color, bool marked, bool force)
{
char *name_cp = NULL;
char *path_cp = NULL;
char *type_cp = NULL;
char *stats_cp = NULL;
wchar_t *icon_cp = NULL;
if (name != NULL)
name_cp = estrdup(name);
if (path != NULL)
path_cp = estrdup(path);
if (type != NULL)
type_cp = estrdup(type);
if (stats != NULL)
stats_cp = estrdup(stats);
if (icon != NULL)
icon_cp = ewcsdup(icon);
/* name, path, stats, type, icon, color */
file new_file = { name_cp, path_cp, type_cp, stats_cp, icon_cp, color };
file new_file = { name, path, type, stats, icon, color };
if (list->capacity != list->length) {
if (marked) {