capensis / canopsis-nagios

Nagios NEB for Canopsis
9 stars 4 forks source link

Memory leak in logger #13

Open micoq opened 6 years ago

micoq commented 6 years ago

The internal logger should release its allocated strings after calling write_to_all_logs():

https://github.com/capensis/canopsis-nagios/blob/59bcacccf7acc2cd750ed5a1cadc0721bb9ac1e7/src/logger.c#L52

buffer and format are dynamically allocated by (v)asprinf:

write_to_all_logs (buffer, priority);
free(buffer);
free(format);