1
1

tweaks: plug a leak, by always freeing the full filename [valgrind]

Этот коммит содержится в:
Benno Schulenberg 2020-06-26 09:47:38 +02:00
родитель 18659f3485
Коммит c0c4a1b2b5

Просмотреть файл

@ -2463,6 +2463,8 @@ char **filename_completion(const char *buf, size_t length, size_t *num_matches)
continue;
}
free(fullname);
matches = (char **)nrealloc(matches, (*num_matches + 1) * sizeof(char *));
matches[*num_matches] = copy_of(entry->d_name);
++(*num_matches);