On Wed, Mar 27, 2019 at 09:20:58PM -0500, Eric Blake wrote:
Most of our completers used the pattern: if ((nITEM = virITEMListAll()) < 0) return NULL; but the virDomainSnapshot and virStorageVolume completers were instead using goto error because of a prior allocation. If the ListAll fails with -1, the cleanup label was running a loop of 'size_t i < int nITEM', which is an extreme waste of CPU cycles. Reported-by: Ján Tomko <jtomko@xxxxxxxxxx> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> --- This one is a bug fix, so worth having in 5.2. tools/virsh-completer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list