sni / mod_gearman

Distribute Naemon Host/Service Checks & Eventhandler with Gearman Queues. Host/Servicegroups affinity included.
http://www.mod-gearman.org
GNU General Public License v3.0
122 stars 42 forks source link

Memory leak #126

Closed jframeau closed 5 years ago

jframeau commented 7 years ago

Hi sven,

I think there's a memory leak in mod_gearman (neb_module/result_thread.c, line 229) as neamon doesn't release that source field.

ifdef USENAEMON

        chk_result->source = gm_strdup( value );

endif

So my proposition in naemon (head):

--- a/src/naemon/checks.c +++ b/src/naemon/checks.c @@ -524,6 +524,7 @@ int free_check_result(check_result *info) nm_free(info->host_name); nm_free(info->service_description); nm_free(info->output);

This leak has been found with valgrind.

Do you agree with that ?

jfr

sni commented 7 years ago

Sounds good