From d80967c9d37e6a77cddc9926076fc7016a8c5034 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Thu, 23 Jun 2011 18:25:36 +0000 Subject: fix use-after-free issue found by Coverity static analysis (thanks to Jiri Popelka) --- userspace/ebtables2/libebtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'userspace') diff --git a/userspace/ebtables2/libebtc.c b/userspace/ebtables2/libebtc.c index 4a9a79d..f66ebef 100644 --- a/userspace/ebtables2/libebtc.c +++ b/userspace/ebtables2/libebtc.c @@ -473,8 +473,8 @@ void ebt_delete_cc(struct ebt_cntchanges *cc) cc->prev->next = cc->next; cc->next->prev = cc->prev; free(cc); - } - cc->type = CNT_DEL; + } else + cc->type = CNT_DEL; } void ebt_empty_chain(struct ebt_u_entries *entries) -- cgit v1.2.3