[libvirt-sandbox][PATCH 1/4] builder: Drop dead code in gvir_sandbox_builder_clean_post_stop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At the 'cleanup' label we try to unref @child. However, whenever
the label is entered there's no chance for the variable to be
anything else than NULL rendering those two lines as dead code.
Drop it. And it's the same story with @info.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 libvirt-sandbox/libvirt-sandbox-builder.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libvirt-sandbox/libvirt-sandbox-builder.c b/libvirt-sandbox/libvirt-sandbox-builder.c
index ea7d064..b4b4d77 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder.c
@@ -752,10 +752,6 @@ gboolean gvir_sandbox_builder_clean_post_stop(GVirSandboxBuilder *builder,
         ret = FALSE;
 
  cleanup:
-    if (child)
-        g_object_unref(child);
-    if (info)
-        g_object_unref(info);
     g_object_unref(enumerator);
     g_object_unref(libsFile);
     g_free(libsdir);
-- 
2.4.9

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]