[PATCH] Make virConnectOpenInternal() report error in all cases

Ani Sinha ani at anisinha.ca
Thu Jan 6 17:11:49 UTC 2022



On Thu, 6 Jan 2022, Daniel P. Berrangé wrote:

> On Thu, Jan 06, 2022 at 08:34:26PM +0530, Ani Sinha wrote:
> > virConnectOpenInternal() does not report error in all failure scenarios, except
> > in some specific cases.
>
> I don't believe this is correct. My reading of the code is that it
> is already reporting errors in all exit paths that can return NULL.

Yes you are likely right. I should have gone one level deeper in the call
chain. I have not checked all the code paths exhaistively but for the one
I checked, the lowest level functions are indeed reporting the more finer
grained errors to their callers.

I have sent an updated patch that just has the last two hunks. I have kept
virConnectOpenInternal() unchanged.


More information about the libvir-list mailing list