]> git.proxmox.com Git - mirror_frr.git/commit
zebra: Reduce creation and fix memory leak of frrscripting pointers
authorDonald Sharp <sharpd@nvidia.com>
Fri, 5 May 2023 15:05:12 +0000 (11:05 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 5 May 2023 16:24:02 +0000 (12:24 -0400)
commitd8be1399720ca36485b6a2209b143679b01b83cb
tree508592d08bdac245a6dd07ab1153dbfbfc85f17c
parent4ead6555c9ed47d6e512512b4a1989830be90d94
zebra: Reduce creation and fix memory leak of frrscripting pointers

There are two issues being addressed:

a) The ZEBRA_ON_RIB_PROCESS_HOOK_CALL script point
was creating a fs pointer per dplane ctx in
rib_process_dplane_results().

b) The fs pointer was not being deleted and directly
leaked.

For (a) Move the creation of the fs to outside
the do while loop.

For (b) At function end ensure that the pointer
is actually deleted.

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