virsh-completer: use g_clear_pointer in virshCommaStringListComplete

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2020-09-14 16:05:52 +02:00
parent 66732236a4
commit a698dfae9b

View File

@ -105,7 +105,7 @@ virshCommaStringListComplete(const char *input,
if ((comma = strrchr(inputCopy, ','))) if ((comma = strrchr(inputCopy, ',')))
*comma = '\0'; *comma = '\0';
else else
VIR_FREE(inputCopy); g_clear_pointer(&inputCopy, g_free);
} }
if (inputCopy && !(inputList = virStringSplit(inputCopy, ",", 0))) if (inputCopy && !(inputList = virStringSplit(inputCopy, ",", 0)))