src/sysfs_devices.c: Fix memory leak and call free() with invalid pointer

This commit is contained in:
Nedko Arnaudov 2023-11-06 21:38:43 +02:00
parent 0e7f70e375
commit f15658888a
1 changed files with 3 additions and 0 deletions

View File

@ -91,9 +91,12 @@ catroof_scan_sysfs_subdir(
}
}
}
free(entry_fullpath);
}
success = true;
goto close;
free_fullpath:
free(entry_fullpath);