mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
uml: Resolve leak if need to requery in umlIdentifyOneChrPTY()
Coverity noted that in the retry logic loop if res had been set, then it could be leaked so add a VIR_FREE(res) prior to retry.
This commit is contained in:
parent
40ef77cd86
commit
ce6de782e9
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* uml_driver.c: core driver methods for managing UML guests
|
* uml_driver.c: core driver methods for managing UML guests
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
* Copyright (C) 2006-2013 Red Hat, Inc.
|
||||||
* Copyright (C) 2006-2008 Daniel P. Berrange
|
* Copyright (C) 2006-2008 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -261,6 +261,7 @@ requery:
|
|||||||
/* XXX should do this in a better non-blocking
|
/* XXX should do this in a better non-blocking
|
||||||
way somehow ...perhaps register a timer */
|
way somehow ...perhaps register a timer */
|
||||||
if (retries++ < 50) {
|
if (retries++ < 50) {
|
||||||
|
VIR_FREE(res);
|
||||||
usleep(1000*10);
|
usleep(1000*10);
|
||||||
goto requery;
|
goto requery;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user