aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1998-06-09 17:38:33 +0000
committerBill Paul <wpaul@FreeBSD.org>1998-06-09 17:38:33 +0000
commit55e07e869f048f0aef0483b4f9ce5fa27865ac16 (patch)
tree3db93f4c61abe5c67bc375e33f71943e6cea6b75 /lib
parent5dbf068b1e11c366f693017dda1742cdfae5fc21 (diff)
downloadsrc-55e07e869f048f0aef0483b4f9ce5fa27865ac16.tar.gz
src-55e07e869f048f0aef0483b4f9ce5fa27865ac16.zip
Fix potential resource leak: when call to des_crypt_1() fails, remember
to destroy the RPC CLIENT handle before returning.
Notes
Notes: svn path=/head/; revision=36816
Diffstat (limited to 'lib')
-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 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 <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);
}