pimd: don't leak original_s_route on error

original_s_route is allocated on the heap and was not freed during the
error case.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Christian Franke 2016-06-14 20:07:07 +02:00 committed by Donald Sharp
parent 6465ad8861
commit 2447614b9c

View File

@ -198,6 +198,10 @@ int pim_static_add(struct interface *iif, struct interface *oif, struct in_addr
pim_static_route_free(s_route);
}
if (original_s_route) {
pim_static_route_free(original_s_route);
}
return -1;
}