X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Fpdu.c;h=d6e823201e99393efa9d1bd3df0988da44c27ef2;hb=b7e444c6cf557fb0b2609217260826fc13a7ed1c;hp=601f11023778a28bb71d83b5d1844fce49c19f22;hpb=2e4db0d14597fdb0013fb16f24b3f872d1217397;p=deb_libnfs.git diff --git a/lib/pdu.c b/lib/pdu.c index 601f110..d6e8232 100644 --- a/lib/pdu.c +++ b/lib/pdu.c @@ -149,6 +149,9 @@ static int rpc_process_reply(struct rpc_context *rpc, struct rpc_pdu *pdu, XDR * bzero(&msg, sizeof(struct rpc_msg)); msg.acpted_rply.ar_verf = _null_auth; if (pdu->xdr_decode_bufsize > 0) { + if (pdu->xdr_decode_buf != NULL) { + free(pdu->xdr_decode_buf); + } pdu->xdr_decode_buf = malloc(pdu->xdr_decode_bufsize); if (pdu->xdr_decode_buf == NULL) { rpc_set_error(rpc, "xdr_replymsg failed in portmap_getport_reply");