Fix memory leak, the path is always allocated on the heap

This commit is contained in:
Maschell 2022-10-08 15:01:15 +02:00
parent c6e9c29cd7
commit 81707c4a30

View File

@ -410,8 +410,7 @@ int vrt_closedir(DIR_P *iter) {
}
}
// root path is not allocated
if (iter->path && *iter->path != 0) {
if (iter->path) {
free(iter->path);
iter->path = NULL;
}