spf6d: fix use after free (2) (Coverity 1221459)

Previous fix was incomplete, as calling ospf6_lsa_unlock() frees 'req' but
it does not put it to zero, so it was called ospf6_lsdb_remove() afterwards
even being 'req' already freed.

Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
paco 2018-06-20 18:09:35 +02:00
parent ce872c6adb
commit 7edb6aa583
No known key found for this signature in database
GPG Key ID: FD112A8C7E6A5E4A

View File

@ -347,6 +347,7 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa,
"Received is newer, remove requesting");
if (req == on->last_ls_req) {
ospf6_lsa_unlock(req);
req = NULL;
on->last_ls_req = NULL;
}
if (req)