mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
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:
parent
66732236a4
commit
a698dfae9b
@ -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)))
|
||||||
|
Loading…
Reference in New Issue
Block a user