summaryrefslogtreecommitdiff
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-20 05:51:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-20 05:51:45 +0000
commit59eb67d03202824bfd170086d1a7c42a58eb21a0 (patch)
tree367539c65f4decb95f10a73fb37adc15cb3578d9 /lib/libc/rpc
parent0fd5a0a6010af1dd4799f413e8111dfafdfcae0b (diff)
bogus frees; from jraynard@freebsd.org
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/clnt_tcp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/rpc/clnt_tcp.c b/lib/libc/rpc/clnt_tcp.c
index ce6dd3bae18..7919181e53d 100644
--- a/lib/libc/rpc/clnt_tcp.c
+++ b/lib/libc/rpc/clnt_tcp.c
@@ -218,8 +218,10 @@ fooy:
/*
* Something goofed, free stuff and barf
*/
- mem_free((caddr_t)ct, sizeof(struct ct_data));
- mem_free((caddr_t)h, sizeof(CLIENT));
+ if (ct)
+ mem_free((caddr_t)ct, sizeof(struct ct_data));
+ if (h)
+ mem_free((caddr_t)h, sizeof(CLIENT));
return ((CLIENT *)NULL);
}