Re: [PATCH] driver: Don't leak saved error in virGetConnectGeneric()

2021-05-17 Thread Ján Tomko
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()

[PATCH] driver: Don't leak saved error in virGetConnectGeneric()

2021-05-17 Thread Michal Privoznik
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