Make sure that freeing the temporary buffer always happens; previous
commit would still result in a leak.
This commit is contained in:
parent
61cad8ca49
commit
d797839afc
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: rpcb_svc_com.c,v 1.3 2000/06/22 08:09:26 fvdl Exp $ */
|
/* $NetBSD: rpcb_svc_com.c,v 1.4 2000/06/22 10:57:38 fvdl Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||||
|
@ -1267,11 +1267,12 @@ handle_reply(int fd, SVCXPRT *xprt)
|
||||||
}
|
}
|
||||||
if (uaddr)
|
if (uaddr)
|
||||||
free((void *) uaddr);
|
free((void *) uaddr);
|
||||||
if (buffer)
|
|
||||||
free(buffer);
|
|
||||||
#endif
|
#endif
|
||||||
svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
|
svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
|
||||||
done:
|
done:
|
||||||
|
if (buffer)
|
||||||
|
free(buffer);
|
||||||
|
|
||||||
if (reply_msg.rm_xid == 0) {
|
if (reply_msg.rm_xid == 0) {
|
||||||
#ifdef SVC_RUN_DEBUG
|
#ifdef SVC_RUN_DEBUG
|
||||||
if (debugging) {
|
if (debugging) {
|
||||||
|
|
Loading…
Reference in New Issue