]> git.puffer.fish Git - matthieu/frr.git/commit
lib: Fix free function
authorDonald Sharp <sharpd@nvidia.com>
Wed, 14 Dec 2022 20:53:06 +0000 (15:53 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 15 Dec 2022 16:15:33 +0000 (11:15 -0500)
commit1fec35c3c7e212e41224035e1c04e2c211634d72
treed4a2444e26d4eff8861db84ff6c58e04ac4cf94d
parent6354d63593d717b4b9a0920cd3a7e6dec10b6e50
lib: Fix free function

The list delete function on creation was set to srv6_locator_chunk_free
Which takes a double pointer and dereferences it to free the data.
When list_delete is called it calls the delete function like this:
                if (*list->del)
                        (*list->del)(node->data);

The data is not passed in by reference and as such we do not have
a double pointer.  Fortunately this list_delete is only really
called on shutdown when the locator was deleted and we do not
have a fun situation where we were suddenly freeing 'something'.

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