diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-09-20 00:40:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-09-20 00:40:37 +0000 |
commit | 78bc10a0849b8afe87c83f4d627d99a602158486 (patch) | |
tree | aad0f80e801b9f3bf4890f8e9859d9c7528b82c8 | |
parent | bdfa0a00fec0c1b3757095030b5f5d92db29f77b (diff) |
incorrect ordering of free operations
-rw-r--r-- | lib/libc/rpc/svc_udp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/rpc/svc_udp.c b/lib/libc/rpc/svc_udp.c index 3ba6d5d1544..5c5ed600d89 100644 --- a/lib/libc/rpc/svc_udp.c +++ b/lib/libc/rpc/svc_udp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_udp.c,v 1.12 2002/09/06 18:35:12 deraadt Exp $"; +static char *rcsid = "$OpenBSD: svc_udp.c,v 1.13 2003/09/20 00:40:36 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -149,8 +149,8 @@ svcudp_bufcreate(sock, sendsz, recvsz) free(su); return (NULL); } - xdrmem_create( - &(su->su_xdrs), rpc_buffer(xprt), su->su_iosz, XDR_DECODE); + xdrmem_create(&(su->su_xdrs), rpc_buffer(xprt), su->su_iosz, + XDR_DECODE); su->su_cache = NULL; xprt->xp_p2 = (caddr_t)su; xprt->xp_verf.oa_base = su->su_verfbody; @@ -160,8 +160,8 @@ svcudp_bufcreate(sock, sendsz, recvsz) if (__xprt_register(xprt) == 0) { if (madesock) (void)close(sock); - free(xprt); free(rpc_buffer(xprt)); + free(xprt); free(su); return (NULL); } |