summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-06-09 17:38:33 +0000
committerwpaul <wpaul@FreeBSD.org>1998-06-09 17:38:33 +0000
commit9ac915bc7d233e3c5edeb5f57e8b0417f9a5cd9d (patch)
treef6c04f8a5a68e3b2dfce699126487a98937b9900 /lib/libc/rpc
parent04f329cb39ba6013086d99c054e70bdcba3f3ae9 (diff)
downloadFreeBSD-src-9ac915bc7d233e3c5edeb5f57e8b0417f9a5cd9d.zip
FreeBSD-src-9ac915bc7d233e3c5edeb5f57e8b0417f9a5cd9d.tar.gz
Fix potential resource leak: when call to des_crypt_1() fails, remember
to destroy the RPC CLIENT handle before returning.
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/crypt_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/rpc/crypt_client.c b/lib/libc/rpc/crypt_client.c
index cdc0c06..abe0319 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 <sys/types.h>
@@ -39,7 +39,7 @@
#include <rpcsvc/crypt.h>
#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);
}
OpenPOWER on IntegriCloud