[libvirt PATCH 1/3] virsh-completer: use g_clear_pointer in virshCommaStringListComplete

Ján Tomko jtomko at redhat.com
Mon Sep 14 16:08:16 UTC 2020


Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 tools/virsh-completer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
index 1d9d212f8a..bb6550ee63 100644
--- a/tools/virsh-completer.c
+++ b/tools/virsh-completer.c
@@ -105,7 +105,7 @@ virshCommaStringListComplete(const char *input,
         if ((comma = strrchr(inputCopy, ',')))
             *comma = '\0';
         else
-            VIR_FREE(inputCopy);
+            g_clear_pointer(&inputCopy, g_free);
     }
 
     if (inputCopy && !(inputList = virStringSplit(inputCopy, ",", 0)))
-- 
2.26.2




More information about the libvir-list mailing list