diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-07-20 05:51:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-07-20 05:51:45 +0000 |
commit | 59eb67d03202824bfd170086d1a7c42a58eb21a0 (patch) | |
tree | 367539c65f4decb95f10a73fb37adc15cb3578d9 | |
parent | 0fd5a0a6010af1dd4799f413e8111dfafdfcae0b (diff) |
bogus frees; from jraynard@freebsd.org
-rw-r--r-- | lib/libc/rpc/clnt_tcp.c | 6 |
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); } |