From 881b4f32140b4141855ea9d9468de2f2de3b8e5b0dafb60969709e82a53920c2 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Mon, 12 Oct 2009 12:23:19 +0000 Subject: [PATCH] Accepting request 22166 from network:utilities Copy from network:utilities/iproute2 based on submit request 22166 from user sax2 OBS-URL: https://build.opensuse.org/request/show/22166 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iproute2?expand=0&rev=24 --- iproute2-2.6.29-1-ss-pclose.diff | 60 ++++++++++++++++++++++++++++++-- iproute2.changes | 5 +++ iproute2.spec | 2 +- 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/iproute2-2.6.29-1-ss-pclose.diff b/iproute2-2.6.29-1-ss-pclose.diff index 31296b1..f3e6911 100644 --- a/iproute2-2.6.29-1-ss-pclose.diff +++ b/iproute2-2.6.29-1-ss-pclose.diff @@ -1,5 +1,5 @@ ---- misc/ss.c 2009-08-28 16:14:59.000000000 +0200 -+++ misc/ss.c 2009-08-28 16:16:00.000000000 +0200 +--- misc/ss.c 2009-10-09 14:26:41.000000000 +0200 ++++ misc/ss.c 2009-10-09 14:30:00.000000000 +0200 @@ -464,6 +464,7 @@ } } @@ -8,3 +8,59 @@ } } +--- misc/ss.c 2009-10-09 14:39:14.000000000 +0200 ++++ misc/ss.c 2009-10-09 14:40:25.000000000 +0200 +@@ -1571,10 +1571,12 @@ + status = fread(buf, 1, sizeof(*h), fp); + if (status < 0) { + perror("Reading header from $TCPDIAG_FILE"); ++ fclose (fp); + return -1; + } + if (status != sizeof(*h)) { + perror("Unexpected EOF reading $TCPDIAG_FILE"); ++ fclose (fp); + return -1; + } + +@@ -1582,16 +1584,20 @@ + + if (status < 0) { + perror("Reading $TCPDIAG_FILE"); ++ fclose (fp); + return -1; + } + if (status + sizeof(*h) < h->nlmsg_len) { + perror("Unexpected EOF reading $TCPDIAG_FILE"); ++ fclose (fp); + return -1; + } + + /* The only legal exit point */ +- if (h->nlmsg_type == NLMSG_DONE) ++ if (h->nlmsg_type == NLMSG_DONE) { ++ fclose (fp); + return 0; ++ } + + if (h->nlmsg_type == NLMSG_ERROR) { + struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h); +@@ -1601,13 +1607,17 @@ + errno = -err->error; + perror("TCPDIAG answered"); + } ++ fclose (fp); + return -1; + } + + err = tcp_show_sock(h, f); +- if (err < 0) ++ if (err < 0) { ++ fclose (fp); + return err; ++ } + } ++ fclose (fp); + } + + static int tcp_show(struct filter *f, int socktype) diff --git a/iproute2.changes b/iproute2.changes index 101dc96..6bff17d 100644 --- a/iproute2.changes +++ b/iproute2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 9 14:17:41 CEST 2009 - ms@suse.de + +- added missing fclose to ss utility (bnc #543986) + ------------------------------------------------------------------- Wed Sep 16 11:36:06 CEST 2009 - ms@suse.de diff --git a/iproute2.spec b/iproute2.spec index 8428b5f..1f85d84 100644 --- a/iproute2.spec +++ b/iproute2.spec @@ -25,7 +25,7 @@ Group: Productivity/Networking/Routing Provides: iproute AutoReqProv: on Version: 2.6.29.1 -Release: 4 +Release: 5 %define rversion 2.6.29-1 Summary: Advanced Routing Url: http://developer.osdl.org/dev/iproute2/