From 36943749147bef10df8ffc0e2ad79f4dd06cd9ac Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Fri, 4 Aug 2006 06:18:04 +0000 Subject: [zebra] IRDP: Move stream_free to where its created, probably fixing a leak 2006-08-01 Paul Jakma * irdp_main.c: (irdp_advertisement) free the stream here, when done, right under where it was allocated so it's blindingly obvious it's correct. This possibly fixes a very slow leak of streams in zebra. * irdp_packet.c: (send_packet) don't free the stream here as it's hard to tell if right, plus an error case seemed to returning before free anyway. --- zebra/irdp_packet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'zebra/irdp_packet.c') diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c index 74c75ab2..3c5f1559 100644 --- a/zebra/irdp_packet.c +++ b/zebra/irdp_packet.c @@ -286,7 +286,7 @@ send_packet(struct interface *ifp, u_long src; int on; - if (!(ifp->flags & IFF_UP)) + if (!(ifp->flags & IFF_UP)) return; if (!p) @@ -311,7 +311,6 @@ send_packet(struct interface *ifp, /* icmp->checksum is already calculated */ ip->ip_len = sizeof(struct ip) + stream_get_endp(s); - stream_free(s); on = 1; if (setsockopt(irdp_sock, IPPROTO_IP, IP_HDRINCL, -- cgit v1.2.1