Menu

#213 opendmark leaks resources on NetBSD

1.3.2
open
nobody
None
2017-04-09
2017-04-09
Roy Marples
No

On NetBSD at least, if nres_init is called resources should be freed with nres_destroy as nres_close is not enough. The symptom is that the system runs out of file descriptors quite quickly.

Discussion

  • Roy Marples

    Roy Marples - 2017-04-09

    Path to correct issue.
    Also detects nres_init correctly has those functions are namespace protected.

     
    • Juri Haberland

      Juri Haberland - 2017-04-17

      Using this patch on Ubuntu 16.04 produces the following warning:

      opendmarc_dns.c: In function dmarc_dns_get_record:
      opendmarc_dns.c:210:50: warning: passing argument 2 of opendmarc_policy_library_dns_hook from incompatible pointer type [-Wincompatible-pointer-types]
                                                        &resp.nsaddr_list);
                                                        ^
      In file included from opendmarc_dns.c:15:0:
      opendmarc_internal.h:233:6: note: expected struct sockaddr_in * but argument is of type struct sockaddr_in (*)[3]
       void opendmarc_policy_library_dns_hook(int *nscountp, struct sockaddr_in *nsaddr_list);
            ^
      
       
      • Roy Marples

        Roy Marples - 2017-05-03

        I'd rather live with compile warnings than leak resources.
        Without this patch my mail server runs out of resources in a few hours use.

        Besides, on NetBSD there are a load of compile warnings as it stands without this patch.

         

Log in to post a comment.

MongoDB Logo MongoDB