From 55e07e869f048f0aef0483b4f9ce5fa27865ac16 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Tue, 9 Jun 1998 17:38:33 +0000 Subject: [PATCH] Fix potential resource leak: when call to des_crypt_1() fails, remember to destroy the RPC CLIENT handle before returning. --- lib/libc/rpc/crypt_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/rpc/crypt_client.c b/lib/libc/rpc/crypt_client.c index cdc0c061d8b3..abe0319bf31e 100644 --- a/lib/libc/rpc/crypt_client.c +++ b/lib/libc/rpc/crypt_client.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: crypt_client.c,v 1.2 1997/05/28 05:05:10 wpaul Exp $ */ #include @@ -39,7 +39,7 @@ #include #ifndef lint -static const char rcsid[] = "$Id$"; +static const char rcsid[] = "$Id: crypt_client.c,v 1.2 1997/05/28 05:05:10 wpaul Exp $"; #endif #ifndef KEYSERVSOCK @@ -71,6 +71,7 @@ _des_crypt_call(buf, len, dparms) result_1 = des_crypt_1(&des_crypt_1_arg, clnt); if (result_1 == (desresp *) NULL) { + clnt_destroy(clnt); return(DESERR_HWERROR); }