diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-08-13 15:08:57 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-08-13 15:10:04 +0200 |
commit | 99a9c68a9e59825e3e46ee24d1403766deb17fb4 (patch) | |
tree | 0817824dcbde49b381887c224d45d1f91589b524 /main/netcf | |
parent | 96ced39074490a4f58069ba0fc73593b166969e8 (diff) | |
download | aports-99a9c68a9e59825e3e46ee24d1403766deb17fb4.tar.bz2 aports-99a9c68a9e59825e3e46ee24d1403766deb17fb4.tar.xz |
main/netcf: fix a memory leak
a big thanks to eblake for help finding/fixing this
Diffstat (limited to 'main/netcf')
-rw-r--r-- | main/netcf/APKBUILD | 19 | ||||
-rw-r--r-- | main/netcf/memleak.patch | 12 |
2 files changed, 26 insertions, 5 deletions
diff --git a/main/netcf/APKBUILD b/main/netcf/APKBUILD index 771b4836d..797a3040c 100644 --- a/main/netcf/APKBUILD +++ b/main/netcf/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=netcf pkgver=0.2.3 -pkgrel=0 +pkgrel=1 pkgdesc="Cross-platform network configuration library" arch="all" url="https://fedorahosted.org/released/netcf" @@ -11,12 +11,18 @@ makedepends="augeas-dev libgcrypt-dev libnl-dev libxml2-dev libxslt-dev pkgconfig readline-dev" install= subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" -source="https://fedorahosted.org/released/netcf/netcf-$pkgver.tar.gz" +source="https://fedorahosted.org/released/netcf/netcf-$pkgver.tar.gz + memleak.patch" replaces="libnetcf" _builddir="$srcdir/netcf-$pkgver" prepare() { cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build() { @@ -45,6 +51,9 @@ libs() { mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr/ } -md5sums="bee292470b06201b59af0fad473a1b65 netcf-0.2.3.tar.gz" -sha256sums="732c9e366e9a6528f0a8e683b8330ac159cc108180dbfe6981341c5e1b07ebb5 netcf-0.2.3.tar.gz" -sha512sums="a51ab4639546d1606d6777d537f83b8d30c2537eafdc0ed699ff8cfbde79b36a68f25b87dacd61074e9fdac9ef80db09dde624d8f6a64ac4213d14f8339bb31d netcf-0.2.3.tar.gz" +md5sums="bee292470b06201b59af0fad473a1b65 netcf-0.2.3.tar.gz +d8ba020e1cf8995ca94a46d5b8d3f459 memleak.patch" +sha256sums="732c9e366e9a6528f0a8e683b8330ac159cc108180dbfe6981341c5e1b07ebb5 netcf-0.2.3.tar.gz +f4323cd0de64ba05b7c1fe02f20589a8aee1337b47e5853a6666fa1129dfc580 memleak.patch" +sha512sums="a51ab4639546d1606d6777d537f83b8d30c2537eafdc0ed699ff8cfbde79b36a68f25b87dacd61074e9fdac9ef80db09dde624d8f6a64ac4213d14f8339bb31d netcf-0.2.3.tar.gz +af19d606ff9d1cc93789d044d7d56cfa13a53be7cfc9007da33f53e917a7d6a9674f5d26fea997878aec17363402d5ccf4d8069cbd2a084f66cfc511bf594ea3 memleak.patch" diff --git a/main/netcf/memleak.patch b/main/netcf/memleak.patch new file mode 100644 index 000000000..20cac7d30 --- /dev/null +++ b/main/netcf/memleak.patch @@ -0,0 +1,12 @@ +diff --git i/src/drv_debian.c w/src/drv_debian.c
+index d762a5d..370eccd 100644
+--- i/src/drv_debian.c
++++ w/src/drv_debian.c
+@@ -145,6 +145,7 @@ static int interface_deps(struct netcf *ncf, char ***slaves, const char *fmt, ..
+ }
+
+ nmatches = aug_match(aug, path, &matches);
++ FREE(path);
+ ERR_COND_BAIL(nmatches < 0, ncf, EOTHER);
+
+ if (!nmatches)
|