summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Tkac <atkac@fedoraproject.org>2007-10-18 17:45:07 +0000
committerAdam Tkac <atkac@fedoraproject.org>2007-10-18 17:45:07 +0000
commitbbe5776b4867c6727031ab1d600804ab974189bf (patch)
treeebbfb667214995df7fe2c948a4c6ce883747119b
parentedea69c54e35e7f0ff77c1b1c6b2aa275b1c0070 (diff)
downloadbind-bbe5776b4867c6727031ab1d600804ab974189bf.tar.gz
bind-bbe5776b4867c6727031ab1d600804ab974189bf.tar.xz
bind-bbe5776b4867c6727031ab1d600804ab974189bf.zip
- fixed missing va_end () functions (#336601)bind-9_5_0-15_1_a6_fc8F-8-split
- fixed memory leak when dbus initialization fails
-rw-r--r--bind-9.5-dbus-leak.patch63
-rw-r--r--bind-9.5-dbus-va_end.patch29
-rw-r--r--bind.spec10
3 files changed, 101 insertions, 1 deletions
diff --git a/bind-9.5-dbus-leak.patch b/bind-9.5-dbus-leak.patch
new file mode 100644
index 0000000..0407cf6
--- /dev/null
+++ b/bind-9.5-dbus-leak.patch
@@ -0,0 +1,63 @@
+Written-by: Adam Tkac <atkac@redhat.com>
+
+diff -up bind-9.5.0a6/contrib/dbus/dbus_mgr.c.leak bind-9.5.0a6/contrib/dbus/dbus_mgr.c
+--- bind-9.5.0a6/contrib/dbus/dbus_mgr.c.leak 2007-05-10 07:47:02.000000000 +0200
++++ bind-9.5.0a6/contrib/dbus/dbus_mgr.c 2007-10-18 13:32:19.000000000 +0200
+@@ -167,6 +167,9 @@ dbus_mgr_init_dbus(ns_dbus_mgr_t *);
+ static isc_result_t
+ dbus_mgr_record_initial_fwdtable(ns_dbus_mgr_t *);
+
++static
++dns_fwdtable_t *dbus_mgr_get_fwdtable(void);
++
+ static void
+ dbus_mgr_free_initial_fwdtable(ns_dbus_mgr_t *);
+
+@@ -272,6 +275,8 @@ dbus_mgr_create
+ return ISC_R_SUCCESS;
+
+ cleanup_mgr:
++ if ( dbus_mgr_get_fwdtable() != NULL)
++ dbus_mgr_free_initial_fwdtable (mgr);
+ if( mgr->task != 0L )
+ isc_task_detach(&(mgr->task));
+ isc_mem_put(mctx, mgr, sizeof(*mgr));
+@@ -623,7 +628,7 @@ static void dbus_mgr_record_initial_forw
+
+ dns_name_init(&(ifwdr->dn), NULL);
+ if( dns_name_dupwithoffsets(name, mgr->mctx, &(ifwdr->dn)) != ISC_R_SUCCESS )
+- return;
++ goto namedup_err;
+
+ ISC_LIST_INIT(ifwdr->sa);
+
+@@ -634,14 +639,27 @@ static void dbus_mgr_record_initial_forw
+ {
+ nsa = isc_mem_get(mgr->mctx, sizeof(isc_sockaddr_t));
+ if( nsa == 0L )
+- return;
++ goto nsa_err;
+ *nsa = *sa;
+ ISC_LINK_INIT(nsa, link);
+ ISC_LIST_APPEND(ifwdr->sa, nsa, link);
+ }
+ ISC_LINK_INIT(ifwdr, link);
+ tsearch( ifwdr, &(mgr->ifwdt), dbus_mgr_ifwdr_comparator);
+-}
++
++ return;
++
++nsa_err:
++ while ( (sa = ISC_LIST_HEAD (ifwdr->sa)) != NULL) {
++ ISC_LIST_UNLINK (ifwdr->sa, sa, link);
++ isc_mem_put (mgr->mctx, sa, sizeof (*sa));
++ }
++
++namedup_err:
++ isc_mem_put (mgr->mctx, ifwdr, sizeof (*ifwdr));
++
++ return;
++}
+
+ static isc_result_t
+ dbus_mgr_record_initial_fwdtable( ns_dbus_mgr_t *mgr )
diff --git a/bind-9.5-dbus-va_end.patch b/bind-9.5-dbus-va_end.patch
new file mode 100644
index 0000000..54b3ee6
--- /dev/null
+++ b/bind-9.5-dbus-va_end.patch
@@ -0,0 +1,29 @@
+Written-by: Peter Jones <pjones@redhat.com>
+Reviewed-by: Adam Tkac <atkac@redhat.com>
+
+--- bind-9.5.0a6/contrib/dbus/dbus_service.c.va_end 2007-10-17 14:55:10.000000000 -0400
++++ bind-9.5.0a6/contrib/dbus/dbus_service.c 2007-10-17 14:56:20.000000000 -0400
+@@ -200,6 +200,7 @@ dbus_svc_add_filter
+ }
+ }
+ }
++ va_end(va);
+ return( 1 );
+ }
+
+@@ -424,6 +425,7 @@ dbus_svc_message_append_args(DBusConnect
+ if( !dbus_message_append_args_valist( msg, firstType, va ) )
+ {
+ if( cs->eh != 0L ) (*(cs->eh))("dbus_svc_send: dbus_message_append_args failed");
++ va_end(va);
+ return 0;
+ }
+ va_end(va);
+@@ -488,6 +490,7 @@ dbus_svc_call
+ va_end(va);
+ return(0L);
+ }
++ va_end(va);
+ return reply;
+ }
+
diff --git a/bind.spec b/bind.spec
index 3035a1f..0dae740 100644
--- a/bind.spec
+++ b/bind.spec
@@ -21,7 +21,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: ISC
Version: 9.5.0
-Release: 15.%{RELEASEVER}%{?dist}
+Release: 15.1.%{RELEASEVER}%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -79,6 +79,8 @@ Patch17: bind-9.3.2b1-fix_sdb_ldap.patch
# D-BUS patches
Patch15: bind-9.5.0-dbus.patch
Patch23: bind-9.5-dbus_archdep_libdir.patch
+Patch81: bind-9.5-dbus-leak.patch
+Patch82: bind-9.5-dbus-va_end.patch
# IDN paches
Patch73: bind-9.5-libidn.patch
@@ -221,6 +223,8 @@ cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools
%if %{WITH_DBUS}
%patch15 -p1 -b .dbus
%patch23 -p1 -b .dbus_archdep_libdir
+%patch81 -p1 -b .leak
+%patch82 -p1 -b .va_end
%endif
%if %{SDB}
%patch17 -p1 -b .fix_sdb_ldap
@@ -645,6 +649,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_sbindir}/bind-chroot-admin
%changelog
+* Wed Oct 18 2007 Adam Tkac <atkac redhat com> 32:9.5.0-15.1.a6
+- fixed missing va_end () functions (#336601)
+- fixed memory leak when dbus initialization fails
+
* Tue Oct 16 2007 Adam Tkac <atkac redhat com> 32:9.5.0-15.a6
- corrected named.5 SDB statement (#326051)