[cups-filters/f19] Fix socket leaks in the BrowsePoll code (bug #1021512).

Tim Waugh twaugh at fedoraproject.org
Mon Oct 21 13:19:11 UTC 2013


commit 625d209b25ce2675a965441314e3e299a95a86ff
Author: Tim Waugh <twaugh at redhat.com>
Date:   Mon Oct 21 14:04:47 2013 +0100

    Fix socket leaks in the BrowsePoll code (bug #1021512).
    
    Resolves: rhbz#1021512

 cups-filters-socket-leak.patch |   22 ++++++++++++++++++++++
 cups-filters.spec              |    9 ++++++++-
 2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/cups-filters-socket-leak.patch b/cups-filters-socket-leak.patch
new file mode 100644
index 0000000..2831a37
--- /dev/null
+++ b/cups-filters-socket-leak.patch
@@ -0,0 +1,22 @@
+diff -up cups-filters-1.0.40/utils/cups-browsed.c.socket-leak cups-filters-1.0.40/utils/cups-browsed.c
+--- cups-filters-1.0.40/utils/cups-browsed.c.socket-leak	2013-10-02 08:53:26.000000000 +0100
++++ cups-filters-1.0.40/utils/cups-browsed.c	2013-10-21 14:03:11.907471644 +0100
+@@ -1677,6 +1677,8 @@ browse_poll_cancel_subscription (browsep
+ 
+   if (response)
+     ippDelete(response);
++
++  httpClose (conn);
+ }
+ 
+ static gboolean
+@@ -1787,6 +1789,9 @@ browse_poll (gpointer data)
+ 
+ fail:
+ 
++  if (conn)
++    httpClose (conn);
++
+   /* Call a new timeout handler so that we run again */
+   g_timeout_add_seconds (BrowseInterval, browse_poll, data);
+ 
diff --git a/cups-filters.spec b/cups-filters.spec
index 0ca5378..bf8d872 100644
--- a/cups-filters.spec
+++ b/cups-filters.spec
@@ -4,7 +4,7 @@
 Summary: OpenPrinting CUPS filters and backends
 Name:    cups-filters
 Version: 1.0.40
-Release: 3%{?dist}
+Release: 4%{?dist}
 
 # For a breakdown of the licensing, see COPYING file
 # GPLv2:   filters: commandto*, imagetoraster, pdftops, rasterto*,
@@ -22,6 +22,7 @@ Url:     http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups
 Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
 
 Patch1: cups-filters-pdf-landscape.patch
+Patch2: cups-filters-socket-leak.patch
 
 Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
 
@@ -107,6 +108,9 @@ This is the development package for OpenPrinting CUPS filters and backends.
 # Fix PDF landscape printing (bug #768811).
 %patch1 -p1 -b .pdf-landscape
 
+# Fix socket leaks in the BrowsePoll code (bug #1021512).
+%patch2 -p1 -b .socket-leak
+
 %build
 # work-around Rpath
 ./autogen.sh
@@ -220,6 +224,9 @@ fi
 %{_libdir}/libfontembed.so
 
 %changelog
+* Mon Oct 21 2013 Tim Waugh <twaugh at redhat.com> - 1.0.40-4
+- Fix socket leaks in the BrowsePoll code (bug #1021512).
+
 * Wed Oct 16 2013 Tim Waugh <twaugh at redhat.com> - 1.0.40-3
 - Ship the gstoraster MIME conversion rule now we provide that filter
   (bug #1019261).


More information about the scm-commits mailing list