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

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



Signed-off-by: Ján Tomko <jtomko 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


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