]> git.puffer.fish Git - matthieu/frr.git/commit
lib: Fix memory leak in in Link State
authorOlivier Dugeon <olivier.dugeon@orange.com>
Fri, 21 Apr 2023 16:16:34 +0000 (18:16 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 9 May 2023 06:52:32 +0000 (09:52 +0300)
commit3b8686f64c203050f2c3554b7ac8a896ee44cde9
treef0424281888c2e35de198996de404f8b32e2fe76
parent7f0d80461139311d00b837f1f6882fc8e458a6a6
lib: Fix memory leak in in Link State

When using ls_stream2ted() function to parse Opaque Link State message to local
TED, in case of vertex or subnet deletion, the function return a pointer to the
deleted ls_element instead of NULL. This could lead into a potential pointer
corruption when caller try to access to the deleted ls_element.

This patch ensure that the ls_element pointer return by ls_stream2ted()
function is NULL when the message event is a delete operation for vertex and
subnet. Note that edge deletion was correctly handled.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
lib/link_state.c