]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: Don't leak memory in rtadv.c code on shutdown
authorDonald Sharp <sharpd@nvidia.com>
Tue, 12 Dec 2023 18:29:47 +0000 (13:29 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 12 Dec 2023 18:29:47 +0000 (13:29 -0500)
commit8fcacf680389778e29acf68adbec9a7021217a22
treed96af678a6af2afc320784a59269dc6ed6de0fbc
parent9393d36690ccfff3904597eac76be59567651424
zebra: Don't leak memory in rtadv.c code on shutdown

The adata variable was being leaked on shutdown since
it was calloc'ed.  There is no need to make this dynamic
memory.  Just choose a size and use that.  Add a bit
of code to ensure that if it's not large enough,
it will just stop and the developer will fix it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/main.c
zebra/rtadv.c
zebra/rtadv.h