[Bro-Dev] #967: Fix for possible memleak in nb_dns

Bro Tracker bro at tracker.bro.org
Sat Mar 16 09:34:32 PDT 2013


#967: Fix for possible memleak in nb_dns
------------------------+---------------------
 Reporter:  grigorescu  |       Type:  Problem
   Status:  new         |   Priority:  Low
Milestone:  Bro2.2      |  Component:  Bro
  Version:  git/master  |   Keywords:
------------------------+---------------------
 I'm not entirely sure if this codepath can even be reached at the moment,
 but a possible memleak exists in nb_dns. Fix is:

 {{{
 diff --git a/src/nb_dns.c b/src/nb_dns.c
 index e8595e6..33a0083 100644
 --- a/src/nb_dns.c
 +++ b/src/nb_dns.c
 @@ -265,6 +265,7 @@ _nb_dns_mkquery(register struct nb_dns_info *nd,
 register const char *name,
         default:
                 snprintf(errstr, NB_DNS_ERRSIZE,
                     "_nb_dns_mkquery: bad family %d", atype);
 +               free(ne);
                 return (-1);
         }
 }}}

-- 
Ticket URL: <http://tracker.bro.org/bro/ticket/967>
Bro Tracker <http://tracker.bro.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list