[PATCH] virGDBusBusInit: Properly check for error when looking up D-Bus address

Pavel Hrdina phrdina at redhat.com
Fri Nov 6 14:19:35 UTC 2020


On Fri, Nov 06, 2020 at 02:30:26PM +0100, Michal Privoznik wrote:
> The virGDBusBusInit is supposed to return a reference to
> requested bus type (system/session) or, if non-shared bus is
> requested then create a new bus of the type. As an argument, it
> gets a double pointer to GError which is passed to all g_dbus_*()
> calls which allocate it on failure. Pretty standard approach.
> However, since it is a double pointer we must dereference the
> first level to see if the value is NULL. IOW:
> 
>   if (*error)
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/util/virgdbus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201106/eec89339/attachment-0001.sig>


More information about the libvir-list mailing list