From a698dfae9b431c0437b38d7fa377192d889f4bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Mon, 14 Sep 2020 16:05:52 +0200 Subject: [PATCH] virsh-completer: use g_clear_pointer in virshCommaStringListComplete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ján Tomko Reviewed-by: Michal Privoznik --- 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)))