On a Monday in 2021, Michal Privoznik wrote:
Recently, a new code was added to virGetConnectGeneric() that saves the original error into a variable so that it's not lost in virConnectClose() called under the 'error' label. However, the error saving code uses virSaveLastError() + virSetError() combo which leaks the memory allocated for the error copy. Using virErrorPreserveLast() + virErrorRestore() does the same job without the memleak. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: PGP signature