[arch-commits] Commit in bird/trunk (01-fix-leak.patch PKGBUILD)
Sébastien Luttringer
seblu at archlinux.org
Fri Dec 29 12:51:08 UTC 2017
Date: Friday, December 29, 2017 @ 12:51:07
Author: seblu
Revision: 313758
upgpkg: bird 2.0.0-2
- fix FS#56879
Added:
bird/trunk/01-fix-leak.patch
Modified:
bird/trunk/PKGBUILD
-------------------+
01-fix-leak.patch | 38 ++++++++++++++++++++++++++++++++++++++
PKGBUILD | 21 ++++++++++++++++++---
2 files changed, 56 insertions(+), 3 deletions(-)
Added: 01-fix-leak.patch
===================================================================
--- 01-fix-leak.patch (rev 0)
+++ 01-fix-leak.patch 2017-12-29 12:51:07 UTC (rev 313758)
@@ -0,0 +1,38 @@
+From 3013fc57bdc97b0031c4f4250b9bdd172f4c0f4e Mon Sep 17 00:00:00 2001
+From: "Ondrej Zajicek (work)" <santiago at crfreenet.org>
+Date: Sat, 16 Dec 2017 00:42:56 +0100
+Subject: [PATCH] Netlink: Fix memory leak
+
+---
+ sysdep/linux/netlink.c | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
+index 72ff13fa..4cb51519 100644
+--- a/sysdep/linux/netlink.c
++++ b/sysdep/linux/netlink.c
+@@ -1666,14 +1666,6 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
+ ra->nh.labels = labels;
+ #endif
+
+- rte *e = rte_get_temp(ra);
+- e->net = net;
+- e->u.krt.src = src;
+- e->u.krt.proto = i->rtm_protocol;
+- e->u.krt.seen = 0;
+- e->u.krt.best = 0;
+- e->u.krt.metric = 0;
+-
+ if (i->rtm_scope != def_scope)
+ {
+ ea_list *ea = lp_alloc(s->pool, sizeof(ea_list) + sizeof(eattr));
+@@ -1687,9 +1679,6 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
+ ea->attrs[0].u.data = i->rtm_scope;
+ }
+
+- if (a[RTA_PRIORITY])
+- e->u.krt.metric = rta_get_u32(a[RTA_PRIORITY]);
+-
+ if (a[RTA_PREFSRC])
+ {
+ ip_addr ps = rta_get_ipa(a[RTA_PREFSRC]);
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-12-29 12:08:41 UTC (rev 313757)
+++ PKGBUILD 2017-12-29 12:51:07 UTC (rev 313758)
@@ -3,7 +3,7 @@
pkgname=bird
pkgver=2.0.0
-pkgrel=1
+pkgrel=2
pkgdesc='RIP, OSPF, BGP, MPLS, BFD, Babbel routing daemon'
arch=('x86_64')
url='http://bird.network.cz/'
@@ -12,10 +12,25 @@
depends=('glibc' 'readline' 'ncurses')
replaces=('bird6')
source=("ftp://bird.network.cz/pub/bird/$pkgname-$pkgver.tar.gz"
- 'bird.service')
+ 'bird.service'
+ '01-fix-leak.patch')
md5sums=('31cbd40f493d6e946e7cdf3158c4923a'
- '69221e063a3f07dcad519d5eeacaae75')
+ '69221e063a3f07dcad519d5eeacaae75'
+ '4936f7eb7a66014e2ad358d94a9ea1a9')
+prepare() {
+ cd $pkgname-$pkgver
+ # apply patch from the source array (should be a pacman feature)
+ local filename
+ for filename in "${source[@]}"; do
+ if [[ "$filename" =~ \.patch$ ]]; then
+ msg2 "Applying patch ${filename##*/}"
+ patch -p1 -N -i "$srcdir/${filename##*/}"
+ fi
+ done
+ :
+}
+
build() {
cd $pkgbase-$pkgver
./configure \
More information about the arch-commits
mailing list