libtirpc/006-memleak1.patch
Marcus Meissner 95f5f1cbd5 Accepting request 313578 from home:kukuk:NIS
- Add 008-fix-undef-ref.patch to fix a undefined reference bug

- Update to version 0.3.2 (bring authdes back)
- Remove 005-no_IPv6_for_old_code.patch (accepted upstream)
- Remove 001-tirpc-features.patch (obsolete)
- Add 005-missing-symvers.patch (fix missing, new symbols)
- Add 006-memleak1.patch (fix memory leak)
- Add 007-memleak2.patch (fix memory leak)

OBS-URL: https://build.opensuse.org/request/show/313578
OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=49
2015-06-29 21:31:36 +00:00

42 lines
1.4 KiB
Diff

xprt->xp_netid can be allocated by makefd_xprt() in
svc_fd_create(), so don't blindly overwrite the
pointer in svc_tli_create()
The API expection is the nc_netid passed in will be
used for the xp_netid. So the pointer must be
freed then re-allocated.
Reported-by: Michael Theall <mtheall@us.ibm.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
src/svc_generic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/svc_generic.c b/src/svc_generic.c
index f49d776..7aae796 100644
--- a/src/svc_generic.c
+++ b/src/svc_generic.c
@@ -283,6 +283,8 @@ svc_tli_create(fd, nconf, bindaddr, sendsz, recvsz)
xprt->xp_type = __rpc_socktype2seman(si.si_socktype);
if (nconf) {
+ if (xprt->xp_netid != NULL)
+ free(xprt->xp_netid);
xprt->xp_netid = strdup(nconf->nc_netid);
xprt->xp_tp = strdup(nconf->nc_device);
}
--
2.4.3
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Libtirpc-devel mailing list
Libtirpc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libtirpc-devel