sudo-project / sudo

Utility to execute a command as another user
https://www.sudo.ws
Other
1.14k stars 209 forks source link

Memory leak in function 'get_editor' #350

Closed JoraGevorgyan closed 5 months ago

JoraGevorgyan commented 5 months ago

The memory leak is found by a static analyzer developed at CAST.

The memory allocated at line 387 may left without free in case of exit from line 404

millert commented 5 months ago

I'm sorry but that doesn't count as a leak, there is no need to free memory before exit. All memory is freed when the process exits.