提交 a3e8a3f3 编写于 作者: Y Yang Hongyang 提交者: Jason Wang

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: NYang Hongyang <yanghy@cn.fujitsu.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NJason Wang <jasowang@redhat.com>
上级 edc98144
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册