diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2020-01-16 10:18:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-16 10:18:35 +0100 |
| commit | 1176e59625e38082b0201ab7b18113fde6f4f4a9 (patch) | |
| tree | 1340a327005620277677b66ef1b57d67c2b1f547 /lib/zclient.c | |
| parent | c36fbd565e444fd07826b03bb93f1c6c140b0767 (diff) | |
| parent | 24c370dd46db24ea4c610751479e908e3fb55b25 (diff) | |
Merge pull request #5674 from qlyoung/fix-zebra-redist-disconnect-memleak
zebra: fix redist memleak on client disconnect
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index 093af44389..ec1082807c 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -143,6 +143,18 @@ void redist_del_instance(struct redist_proto *red, unsigned short instance) } } +void redist_del_all_instances(struct redist_proto *red) +{ + struct listnode *ln, *nn; + unsigned short *id; + + if (!red->instances) + return; + + for (ALL_LIST_ELEMENTS(red->instances, ln, nn, id)) + redist_del_instance(red, *id); +} + /* Stop zebra client services. */ void zclient_stop(struct zclient *zclient) { |
