ggreer / the_silver_searcher

A code-searching tool similar to ack, but faster.
http://geoff.greer.fm/ag/
Apache License 2.0
26.2k stars 1.43k forks source link

memory leak in function 'parse_options' #1531

Closed JoraGevorgyan closed 8 months ago

JoraGevorgyan commented 1 year ago

The memory leak is reported by a static analyzer tool developed at CAST the allocated memory will left without free when the function fails to allocated another one, because in function 'ag_malloc' it checks if memory is not allocated and exits whole program

plaukiu commented 9 months ago

Leaks are of no importance for short running programs. They can actually improve performance as the OS reclaims the resources anyways.