From bd2178d0cf2393087a77bb515e98787f9baa6df8 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 6 Jan 2009 17:25:15 +0000 Subject: [PATCH] [SIGAR-132] Fix possible memory leak in sigar_rpc_ping --- src/sigar_util.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/sigar_util.c b/src/sigar_util.c index 1de28b26..fa77a16a 100644 --- a/src/sigar_util.c +++ b/src/sigar_util.c @@ -824,13 +824,9 @@ SIGAR_DECLARE(int) sigar_rpc_ping(char *host, rpc_stat = clnt_call(client, NULLPROC, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_void, NULL, timeout); - if (rpc_stat != RPC_SUCCESS) { - return rpc_stat; - } - clnt_destroy(client); - return RPC_SUCCESS; + return rpc_stat; } #endif