rpms/net-snmp/devel net-snmp-5.4-ip-addr-route-leaks.patch, NONE, 1.1 net-snmp-5.4-tcpConn-tcp6-fopen.patch, NONE, 1.1 net-snmp.spec, 1.97, 1.98

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Dec 12 10:17:02 UTC 2006


Author: rvokal

Update of /cvs/dist/rpms/net-snmp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19758

Modified Files:
	net-snmp.spec 
Added Files:
	net-snmp-5.4-ip-addr-route-leaks.patch 
	net-snmp-5.4-tcpConn-tcp6-fopen.patch 
Log Message:
 - fix memleaks in ip-addr and tcpConn

net-snmp-5.4-ip-addr-route-leaks.patch:
 ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c |    6 +++++-
 ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c     |    6 +++++-
 ip-mib/ipAddressTable/ipAddressTable.c                 |    6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

--- NEW FILE net-snmp-5.4-ip-addr-route-leaks.patch ---
Index: agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c	25 Jan 2006 16:25:56 -0000	1.17
+++ agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c	6 Dec 2006 15:10:40 -0000	1.18
@@ -2,7 +2,7 @@
  * Note: this file originally auto-generated by mib2c using
  *       version : 1.48 $ of : mfd-top.m2c,v $ 
  *
- * $Id: ipAddressTable.c,v 1.17 2006/01/25 16:25:56 dts12 Exp $
+ * $Id: ipAddressTable.c,v 1.18 2006/12/06 15:10:40 rstory Exp $
  */
 /** \page MFD helper for ipAddressTable
  *
@@ -156,6 +156,10 @@ ipAddressTable_rowreq_ctx_cleanup(ipAddr
     /*
      * TODO:211:o: |-> Perform extra ipAddressTable rowreq cleanup.
      */
+    if (NULL != rowreq_ctx->data) {
+        ipAddressTable_release_data(rowreq_ctx->data);
+        rowreq_ctx->data = NULL;
+    }
 }                               /* ipAddressTable_rowreq_ctx_cleanup */
 
 /**
Index: agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -r1.12 -r1.13
--- agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c	12 Jun 2006 20:05:20 -0000	1.12
+++ agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c	6 Dec 2006 15:01:26 -0000	1.13
@@ -2,7 +2,7 @@
  * Note: this file originally auto-generated by mib2c using
  *       version : 1.48 $ of : mfd-top.m2c,v $ 
  *
- * $Id: inetCidrRouteTable.c,v 1.12 2006/06/12 20:05:20 rstory Exp $
+ * $Id: inetCidrRouteTable.c,v 1.13 2006/12/06 15:01:26 rstory Exp $
  */
 /** \page MFD helper for inetCidrRouteTable
  *
@@ -205,6 +205,10 @@ inetCidrRouteTable_rowreq_ctx_cleanup(in
     /*
      * TODO:211:o: |-> Perform extra inetCidrRouteTable rowreq cleanup.
      */
+    if (NULL != rowreq_ctx->data) {
+        inetCidrRouteTable_release_data(rowreq_ctx->data);
+        rowreq_ctx->data = NULL;
+    }
 }                               /* inetCidrRouteTable_rowreq_ctx_cleanup */
 
 /**
Index: agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c	25 Jan 2006 16:25:54 -0000	1.11
+++ agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c	6 Dec 2006 15:01:26 -0000	1.12
@@ -2,7 +2,7 @@
  * Note: this file originally auto-generated by mib2c using
  *       version : 1.48 $ of : mfd-top.m2c,v $ 
  *
- * $Id: ipCidrRouteTable.c,v 1.11 2006/01/25 16:25:54 dts12 Exp $
+ * $Id: ipCidrRouteTable.c,v 1.12 2006/12/06 15:01:26 rstory Exp $
  */
 /** \page MFD helper for ipCidrRouteTable
  *
@@ -160,6 +160,10 @@ ipCidrRouteTable_rowreq_ctx_cleanup(ipCi
     /*
      * TODO:211:o: |-> Perform extra ipCidrRouteTable rowreq cleanup.
      */
+    if (NULL != rowreq_ctx->data) {
+        ipCidrRouteTable_release_data(rowreq_ctx->data);
+        rowreq_ctx->data = NULL;
+    }
 }                               /* ipCidrRouteTable_rowreq_ctx_cleanup */
 
 /**

 	  	 

net-snmp-5.4-tcpConn-tcp6-fopen.patch:
 tcpConn_linux.c |    9 ---------
 1 files changed, 9 deletions(-)

--- NEW FILE net-snmp-5.4-tcpConn-tcp6-fopen.patch ---
--- net-snmp-5.4/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c.old	2006-12-08 15:29:56.000000000 +0200
+++ net-snmp-5.4/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c	2006-12-08 15:30:39.000000000 +0200
@@ -275,15 +275,6 @@
     if (0 == log_open_err)
         log_open_err = 1;
     
-    netsnmp_assert(NULL != container);
-
-#undef PROCFILE
-#define PROCFILE "/proc/net/tcp6"
-    if (!(in = fopen(PROCFILE, "r"))) {
-        snmp_log(LOG_ERR,"could not open " PROCFILE "\n");
-        return -2;
-    }
-    
     fgets(line, sizeof(line), in); /* skip header */
 
     /*

 	  	 


Index: net-snmp.spec
===================================================================
RCS file: /cvs/dist/rpms/net-snmp/devel/net-snmp.spec,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- net-snmp.spec	7 Dec 2006 11:50:05 -0000	1.97
+++ net-snmp.spec	12 Dec 2006 10:17:00 -0000	1.98
@@ -7,7 +7,7 @@
 Summary: A collection of SNMP protocol tools and libraries
 Name: net-snmp
 Version: %{major_ver}
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 
 License: BSDish
@@ -32,6 +32,8 @@
 Patch8: net-snmp-5.3.1-multilib.patch
 Patch9: net-snmp-5.4-config_libdir.patch
 Patch10: net-snmp-5.4-if_addr.patch
+Patch11: net-snmp-5.4-ip-addr-route-leaks.patch
+Patch12: net-snmp-5.4-tcpConn-tcp6-fopen.patch
 
 Requires(pre): /sbin/chkconfig
 Obsoletes: ucd-snmp
@@ -137,6 +139,10 @@
 %patch9 -p1 -b .libdir
 %patch10 -p1 -b .if_addr
 
+#in net-snmp 5.4.1
+%patch11 -p0 -b .route-leak
+%patch12 -p1 -b .tcp6-fopen
+
 # Do this patch with a perl hack...
 perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh
 
@@ -347,6 +353,9 @@
 %{_libdir}/lib*.so.*
 
 %changelog
+* Tue Dec 12 2006 Radek Vokál <rvokal at redhat.com> - 5.4-5
+- fix memleaks in ip-addr and tcpConn
+
 * Thu Dec  7 2006 Radek Vokál <rvokal at redhat.com> - 5.4-4
 - fix rtnetlink.h/if_addr.h 
 




More information about the fedora-cvs-commits mailing list