]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - net/net.c
qom: Change object_get_canonical_path_component() not to malloc
[thirdparty/qemu.git] / net / net.c
index 7fddcebaa2db8dfcc0ab674c57e79ca3479af82b..bbaedb3c7a6db5ec87169b07ed63e9ef45ac66da 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -1185,12 +1185,10 @@ void print_net_client(Monitor *mon, NetClientState *nc)
         monitor_printf(mon, "filters:\n");
     }
     QTAILQ_FOREACH(nf, &nc->filters, next) {
-        char *path = object_get_canonical_path_component(OBJECT(nf));
-
-        monitor_printf(mon, "  - %s: type=%s", path,
+        monitor_printf(mon, "  - %s: type=%s",
+                       object_get_canonical_path_component(OBJECT(nf)),
                        object_get_typename(OBJECT(nf)));
         netfilter_print_info(mon, nf);
-        g_free(path);
     }
 }