NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
RE: lib/47617: Memory and socket leak in librpc
The following reply was made to PR lib/47617; it has been noted by GNATS.
From: Thorsten Brehm <tbrehm%dspace.de@localhost>
To: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%NetBSD.org@localhost>
Cc:
Subject: RE: lib/47617: Memory and socket leak in librpc
Date: Mon, 4 Mar 2013 15:21:21 +0000
--_002_C8EE0F1FA402474893651B07DA446721EDC3F6C4Exchange2010dsp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Attached is the patch fixing the issue (see description above).
Best regards,
Thorsten
--_002_C8EE0F1FA402474893651B07DA446721EDC3F6C4Exchange2010dsp_
Content-Type: application/octet-stream; name="rpc_xprt_register.patch"
Content-Description: rpc_xprt_register.patch
Content-Disposition: attachment; filename="rpc_xprt_register.patch";
size=5251; creation-date="Mon, 04 Mar 2013 11:29:52 GMT";
modification-date="Mon, 04 Mar 2013 13:50:53 GMT"
Content-Transfer-Encoding: base64
ZGlmZiAtcnUgb3JpZ2luYWwvaW5jbHVkZS9ycGMvc3ZjLmggc3JjL2luY2x1ZGUvcnBjL3N2Yy5o
Ci0tLSBvcmlnaW5hbC9pbmNsdWRlL3JwYy9zdmMuaAlUdWUgQXVnIDMwIDIwOjA2OjIwIDIwMTEK
KysrIHNyYy9pbmNsdWRlL3JwYy9zdmMuaAlNb24gTWFyICA0IDEyOjA1OjEzIDIwMTMKQEAgLTIy
MSw3ICsyMjEsNyBAQAogICoJU1ZDWFBSVCAqeHBydDsNCiAgKi8NCiBfX0JFR0lOX0RFQ0xTDQot
ZXh0ZXJuIHZvaWQJeHBydF9yZWdpc3RlcgkoU1ZDWFBSVCAqKTsNCitleHRlcm4gYm9vbF90CXhw
cnRfcmVnaXN0ZXIJKFNWQ1hQUlQgKik7DQogX19FTkRfREVDTFMNCiANCiAvKg0KZGlmZiAtcnUg
b3JpZ2luYWwvbGliL2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