summaryrefslogtreecommitdiffstats
path: root/zebra/irdp_main.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-08-04 08:18:04 +0200
committerPaul Jakma <paul.jakma@sun.com>2006-08-04 08:18:04 +0200
commit36943749147bef10df8ffc0e2ad79f4dd06cd9ac (patch)
tree17f031ea7faf31f94e7e7adfaace741ca4d17e39 /zebra/irdp_main.c
parent[zebra] add more stuff to misc_null to avoid compile breakages (diff)
downloadfrr-36943749147bef10df8ffc0e2ad79f4dd06cd9ac.tar.xz
frr-36943749147bef10df8ffc0e2ad79f4dd06cd9ac.zip
[zebra] IRDP: Move stream_free to where its created, probably fixing a leak
2006-08-01 Paul Jakma <paul.jakma@sun.com> * 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.
Diffstat (limited to 'zebra/irdp_main.c')
-rw-r--r--zebra/irdp_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 04f12f185..e4e71cf37 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -224,7 +224,8 @@ static void irdp_advertisement (struct interface *ifp, struct prefix *p)
struct stream *s;
s = stream_new (128);
make_advertisement_packet (ifp, p, s);
- irdp_send(ifp, p, s);
+ irdp_send(ifp, p, s);
+ stream_free (s);
}
int irdp_send_thread(struct thread *t_advert)