diff options
author | Li Zhijian <lizhijian@cn.fujitsu.com> | 2015-12-23 15:43:19 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2016-01-11 11:01:34 +0800 |
commit | b50c7d452f5aef52cc9e7461f215cab87c3f3b03 (patch) | |
tree | 50b491df8e970a70b9f94bf2e46ee6bec65f5ec2 /net/dump.c | |
parent | c12d82ef15e4a128a24c2fdaadcc45ba49133a27 (diff) |
net/dump: fix nfds->filename leak
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/dump.c')
-rw-r--r-- | net/dump.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/dump.c b/net/dump.c index ce16a4b0e3..347b5ca334 100644 --- a/net/dump.c +++ b/net/dump.c @@ -329,6 +329,13 @@ static void filter_dump_instance_init(Object *obj) file_dump_set_filename, NULL); } +static void filter_dump_instance_finalize(Object *obj) +{ + NetFilterDumpState *nfds = FILTER_DUMP(obj); + + g_free(nfds->filename); +} + static void filter_dump_class_init(ObjectClass *oc, void *data) { NetFilterClass *nfc = NETFILTER_CLASS(oc); @@ -343,6 +350,7 @@ static const TypeInfo filter_dump_info = { .parent = TYPE_NETFILTER, .class_init = filter_dump_class_init, .instance_init = filter_dump_instance_init, + .instance_finalize = filter_dump_instance_finalize, .instance_size = sizeof(NetFilterDumpState), }; |