diff options
-rw-r--r-- | main/ldb/APKBUILD | 6 | ||||
-rw-r--r-- | main/ldb/fix-memory-leak-on-module-context.patch | 23 |
2 files changed, 27 insertions, 2 deletions
diff --git a/main/ldb/APKBUILD b/main/ldb/APKBUILD index fa26c9095a..6829f9b995 100644 --- a/main/ldb/APKBUILD +++ b/main/ldb/APKBUILD @@ -9,7 +9,8 @@ license="LGPL-3.0-or-later" makedepends="libtirpc-dev tevent-dev py2-tevent tdb-dev py-tdb talloc-dev python2-dev python3-dev popt-dev cmocka-dev" subpackages="$pkgname-dev py2-$pkgname:_py2 py3-$pkgname:_py3 $pkgname-tools" -source="https://www.samba.org/ftp/pub/ldb/$pkgname-$pkgver.tar.gz" +source="https://www.samba.org/ftp/pub/ldb/$pkgname-$pkgver.tar.gz + fix-memory-leak-on-module-context.patch" builddir="$srcdir/$pkgname-$pkgver" build() { @@ -60,4 +61,5 @@ tools() { mv "$pkgdir"/usr/lib/ldb/libldb-cmdline.* "$subpkgdir"/usr/lib/ldb/ } -sha512sums="31b29a2a991038910830cb47b02b7f08e1958638d073d5f1602a2657c4005c7e5f5f2c2f7972eeddef462d8c70aaad7f02ddf901cb50f1b1bbafa0c22498973d ldb-1.3.2.tar.gz" +sha512sums="31b29a2a991038910830cb47b02b7f08e1958638d073d5f1602a2657c4005c7e5f5f2c2f7972eeddef462d8c70aaad7f02ddf901cb50f1b1bbafa0c22498973d ldb-1.3.2.tar.gz +7524e23ff8fe378fc4e24ac9e93bfa27012a2a646c5411d419d0181ffd4192fdbb0c3b28f4e2a2e43cf93a1340eeaf526699ac16d846b616612d922abd2595aa fix-memory-leak-on-module-context.patch" diff --git a/main/ldb/fix-memory-leak-on-module-context.patch b/main/ldb/fix-memory-leak-on-module-context.patch new file mode 100644 index 0000000000..f8fcfff716 --- /dev/null +++ b/main/ldb/fix-memory-leak-on-module-context.patch @@ -0,0 +1,23 @@ +From 6c78935344a4f086fc209d0bd77feac0ea5894b3 Mon Sep 17 00:00:00 2001 +From: Lukas Slebodnik <lslebodn@fedoraproject.org> +Date: Sat, 21 Oct 2017 15:09:01 +0200 +Subject: [PATCH] ldb: Fix memory leak on module context + +Introduced in e8cdacc509016d9273d63faf334d9f827585c3eb + +Patch-Source: https://src.fedoraproject.org/rpms/libldb/blob/f28/f/0001-ldb-Fix-memory-leak-on-module-context.patch + +--- a/ldb_tdb/ldb_index.c ++++ b/ldb_tdb/ldb_index.c +@@ -516,9 +516,9 @@ static int ltdb_dn_list_store_full(struct ldb_module *module, + if (list->count == 0) { + ret = ltdb_delete_noindex(module, msg); + if (ret == LDB_ERR_NO_SUCH_OBJECT) { +- talloc_free(msg); +- return LDB_SUCCESS; ++ ret = LDB_SUCCESS; + } ++ talloc_free(msg); + return ret; + } + |