net/filter: fix nf->netdev_id leak

Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
Li Zhijian 2015-12-23 15:43:18 +08:00 committed by Jason Wang
parent b50c7d452f
commit 671f66f87f

View File

@ -204,6 +204,7 @@ static void netfilter_finalize(Object *obj)
if (nf->netdev && !QTAILQ_EMPTY(&nf->netdev->filters)) { if (nf->netdev && !QTAILQ_EMPTY(&nf->netdev->filters)) {
QTAILQ_REMOVE(&nf->netdev->filters, nf, next); QTAILQ_REMOVE(&nf->netdev->filters, nf, next);
} }
g_free(nf->netdev_id);
} }
static void netfilter_class_init(ObjectClass *oc, void *data) static void netfilter_class_init(ObjectClass *oc, void *data)