Electrux / ls_extended

ls with coloring and icons
BSD 3-Clause "New" or "Revised" License
201 stars 14 forks source link

memory leak #45

Closed dududuguo closed 5 months ago

dududuguo commented 6 months ago

$ uname -a Linux 505cf5a8c892 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux $ ./ls_extended  ls_extended

It will be memory leak. sink is in src/vec.c:37.

The problem is when i go to if( flags & OPT_V )... else{}, the else is only return not free, so that memory leak. Maybe the solution is add vec_destroy( & locs ); in main.c:54 thank you!

Electrux commented 5 months ago

Thanks for the info mate, fixed. :)