diff options
author | Yang Hongyang <yanghy@cn.fujitsu.com> | 2015-10-20 09:51:26 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2015-10-27 10:30:42 +0800 |
commit | a3e8a3f382363d5fd452cfc15f90a688d70023d9 (patch) | |
tree | f2006985ecaa3a8b377241e58f4c4260ce29993e /net | |
parent | edc981443d5bd23e01639c2fbba4fbc2dc30204f (diff) | |
download | qemu-a3e8a3f382363d5fd452cfc15f90a688d70023d9.tar.gz qemu-a3e8a3f382363d5fd452cfc15f90a688d70023d9.tar.bz2 qemu-a3e8a3f382363d5fd452cfc15f90a688d70023d9.zip |
net: free the string returned by object_get_canonical_path_component
The value returned from object_get_canonical_path_component
must be freed.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1197,10 +1197,11 @@ void print_net_client(Monitor *mon, NetClientState *nc) monitor_printf(mon, "filters:\n"); } QTAILQ_FOREACH(nf, &nc->filters, next) { - monitor_printf(mon, " - %s: type=%s%s\n", - object_get_canonical_path_component(OBJECT(nf)), + char *path = object_get_canonical_path_component(OBJECT(nf)); + monitor_printf(mon, " - %s: type=%s%s\n", path, object_get_typename(OBJECT(nf)), nf->info_str); + g_free(path); } } |