
On Mon, Apr 01, 2019 at 09:33:24 +0200, Ján Tomko wrote:
We've been open-coding virStringListFreeCount for cleaning up the completion list we're building. This had the advantage of zeoring the pointer afterwards, which is no longer needed now that we compile the list in 'tmp' instead of 'ret'.
But now you are not preserving the holy NULLs on the stack!!.
Since all our lists are NULL-terminated anyway, switch to using virStringListFree which has the benefit of being usable with our VIR_AUTOSTRINGLIST macro.
Fixes nearly impossible NULL dereferences in virshNWFilterBindingNameCompleter virshNWFilterNameCompleter virshNodeDeviceNameCompleter virshNetworkNameCompleter virshInterfaceNameCompleter virshStoragePoolNameCompleter virshDomainNameCompleter which jumped on the error label after a failed allocation and a possible one in virshStorageVolNameCompleter which jumped there when we fail to fetch the list of volumes.
Signed-off-by: Ján Tomko <jtomko@redhat.com> ---
ACK