A few admin client methods had the xdr_free call the wrong
side of the cleanup label, so typed parameters would not
be freed on error.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/admin/admin_remote.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/admin/admin_remote.c b/src/admin/admin_remote.c
index 012488bff3..f99b93eef6 100644
--- a/src/admin/admin_remote.c
+++ b/src/admin/admin_remote.c
@@ -269,9 +269,9 @@ remoteAdminServerGetThreadPoolParameters(virAdmServerPtr srv,
goto cleanup;
rv = 0;
- xdr_free((xdrproc_t)xdr_admin_server_get_threadpool_parameters_ret, (char *)
&ret);
cleanup:
+ xdr_free((xdrproc_t)xdr_admin_server_get_threadpool_parameters_ret, (char *)
&ret);
virObjectUnlock(priv);
return rv;
}
@@ -342,9 +342,9 @@ remoteAdminClientGetInfo(virAdmClientPtr client,
goto cleanup;
rv = 0;
- xdr_free((xdrproc_t)xdr_admin_client_get_info_ret, (char *) &ret);
cleanup:
+ xdr_free((xdrproc_t)xdr_admin_client_get_info_ret, (char *) &ret);
virObjectUnlock(priv);
return rv;
}
@@ -380,10 +380,10 @@ remoteAdminServerGetClientLimits(virAdmServerPtr srv,
goto cleanup;
rv = 0;
- xdr_free((xdrproc_t) xdr_admin_server_get_client_limits_ret,
- (char *) &ret);
cleanup:
+ xdr_free((xdrproc_t) xdr_admin_server_get_client_limits_ret,
+ (char *) &ret);
virObjectUnlock(priv);
return rv;
}
--
2.38.1