On Mon, Mar 02, 2020 at 07:22:03 +0530, Gaurav Agrawal wrote: > Signed-off-by: Gaurav Agrawal <agrawalgaurav@xxxxxxxxx> > --- > src/admin/libvirt-admin.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) [...] > @@ -251,16 +251,11 @@ virAdmConnectOpen(const char *name, unsigned int flags) > if (remoteAdminConnectOpen(conn, flags) < 0) > goto error; > > - cleanup: > - VIR_FREE(sock_path); > - VIR_FREE(uristr); > - return conn; Removing this 'return' will make this function ALWAYS return NULL when the control flow now continues through the error label. > > error: > virDispatchError(NULL); > virObjectUnref(conn); > - conn = NULL; > - goto cleanup; > + return NULL; > }