From: glenn <> Date: Wed, 2 Dec 1998 12:49:24 +0000 (+0000) Subject: cbdata and other memory bug fix X-Git-Tag: SQUID_3_0_PRE1~2488 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c5a8809ca233c4a325375abe52be31aeaee22b0;p=thirdparty%2Fsquid.git cbdata and other memory bug fix --- diff --git a/src/snmp_core.cc b/src/snmp_core.cc index a8a3b2aa5c..83801dc09f 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -1,5 +1,5 @@ /* - * $Id: snmp_core.cc,v 1.19 1998/11/25 09:00:25 wessels Exp $ + * $Id: snmp_core.cc,v 1.20 1998/12/02 05:49:24 glenn Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -542,6 +542,7 @@ snmpHandleUdp(int sock, void *not_used) snmp_rq->outbuf = xmalloc(snmp_rq->outlen = SNMP_REQUEST_SIZE); memcpy(&snmp_rq->from, &from, sizeof(struct sockaddr_in)); snmpDecodePacket(snmp_rq); + xfree(snmp_rq); } else { debug(49, 1) ("snmpHandleUdp: FD %d recvfrom: %s\n", sock, xstrerror()); } @@ -568,7 +569,6 @@ snmpDecodePacket(snmp_request_t * rq) Session->authenticator = NULL; Session->community = (u_char *) xstrdup("public"); Session->community_len = 6; - cbdataAdd(rq, MEM_NONE); PDU = snmp_pdu_create(0); Community = snmp_parse(Session, PDU, buf, len);