From e062cfb7802637f1a32ed96453bec08c49970ee6 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 16:04:17 +0000 Subject: import libtirpc-0.2.4-0.6.el7 --- diff --git a/SOURCES/libtirpc-0.2.4-mem-leak.patch b/SOURCES/libtirpc-0.2.4-mem-leak.patch new file mode 100644 index 0000000..a0b9079 --- /dev/null +++ b/SOURCES/libtirpc-0.2.4-mem-leak.patch @@ -0,0 +1,37 @@ +diff -up libtirpc-0.2.4/src/svc_generic.c.orig libtirpc-0.2.4/src/svc_generic.c +--- libtirpc-0.2.4/src/svc_generic.c.orig 2013-12-09 15:59:51.000000000 -0500 ++++ libtirpc-0.2.4/src/svc_generic.c 2015-06-29 10:20:27.239019533 -0400 +@@ -283,6 +283,8 @@ svc_tli_create(fd, nconf, bindaddr, send + 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); + } +diff -up libtirpc-0.2.4/src/svc_vc.c.orig libtirpc-0.2.4/src/svc_vc.c +--- libtirpc-0.2.4/src/svc_vc.c.orig 2015-06-29 10:19:21.205835483 -0400 ++++ libtirpc-0.2.4/src/svc_vc.c 2015-06-29 10:20:34.616151809 -0400 +@@ -393,6 +393,12 @@ svc_vc_destroy(xprt) + __svc_vc_dodestroy(xprt); + } + ++static bool_t ++__svc_rendezvous_socket(xprt) ++ SVCXPRT *xprt; ++{ ++ return (xprt->xp_ops->xp_recv == rendezvous_request); ++} + static void + __svc_vc_dodestroy(xprt) + SVCXPRT *xprt; +@@ -404,7 +410,7 @@ __svc_vc_dodestroy(xprt) + + if (xprt->xp_fd != RPC_ANYFD) + (void)close(xprt->xp_fd); +- if (xprt->xp_port != 0) { ++ if (__svc_rendezvous_socket(xprt)) { + /* a rendezvouser socket */ + r = (struct cf_rendezvous *)xprt->xp_p1; + mem_free(r, sizeof (struct cf_rendezvous)); diff --git a/SPECS/libtirpc.spec b/SPECS/libtirpc.spec index ed10cda..cdb7f85 100644 --- a/SPECS/libtirpc.spec +++ b/SPECS/libtirpc.spec @@ -2,7 +2,7 @@ Name: libtirpc Version: 0.2.4 -Release: 0.5%{?dist} +Release: 0.6%{?dist} Summary: Transport Independent RPC Library Group: System Environment/Libraries License: SISSL and BSD @@ -20,6 +20,11 @@ BuildRequires: krb5-devel Patch001: libtirpc-0.2.4-svc-buffer-overflow.patch Patch002: libtirpc-0.2.4-nonblocking-mode.patch +# +# RHEL7.2 +# +Patch003: libtirpc-0.2.4-mem-leak.patch + %description This package contains SunLib's implementation of transport-independent RPC (TI-RPC) documentation. This library forms a piece of the base of @@ -49,6 +54,8 @@ developing programs which use the tirpc library. %patch001 -p1 # 1162714 - Non blocking mode for writes is broken %patch002 -p1 +# 1236187 - Memory Leak in libtirpc +%patch003 -p1 # Remove .orig files find . -name "*.orig" | xargs rm -f @@ -137,6 +144,9 @@ rm -rf %{buildroot} %{_mandir}/*/* %changelog +* Mon Jun 29 2015 Steve Dickson 0.2.4-0.6 +- Fixed a couple memory leaks (bz 1236187) + * Sat Nov 15 2014 Steve Dickson 0.2.4-0.5 - Fixed the non-blocking mode (bz 1162714)