pacman/lib/libalpm
Rikard Falkeborn 1b32897453 Add REALLOC macro to simplify realloc error handling
realloc can fail just like the other memory allocation functions. Add a
macro to simplify handling of realloc failures, similar to the already
existing MALLOC, CALLOC, etc.

Replace the existing realloc uses with the new macro, allowing us to
move tedious error handling to the macro. Also, in be_package and
be_sync, this fixes hypothetical memory leaks (and thereafter null
pointer dereferences) in case realloc fails to shrink the allocated
memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-04-13 23:44:46 +10:00
..
po Final translation updates for pacman-5.2.0 2019-10-21 17:25:29 +10:00
.gitignore libalpm: add pkg-config file 2012-04-25 20:02:36 -04:00
add.c Remove unneeded goto cleanup 2020-03-09 14:51:38 +10:00
add.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
alpm.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
alpm.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
alpm_list.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
alpm_list.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
backup.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
backup.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
base64.c base64.c: comment out unused variable 2014-01-15 15:54:56 +10:00
base64.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
be_local.c Add REALLOC macro to simplify realloc error handling 2020-04-13 23:44:46 +10:00
be_package.c Add REALLOC macro to simplify realloc error handling 2020-04-13 23:44:46 +10:00
be_sync.c Add REALLOC macro to simplify realloc error handling 2020-04-13 23:44:46 +10:00
conflict.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
conflict.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
db.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
db.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
deps.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
deps.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
diskspace.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
diskspace.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
dload.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
dload.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
error.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
filelist.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
filelist.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
graph.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
graph.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
group.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
group.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
handle.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
handle.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
hook.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
hook.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
ini.c run hooks during trans_commit 2015-10-18 10:59:23 +10:00
ini.h run hooks during trans_commit 2015-10-18 10:59:23 +10:00
libalpm.pc.in build: check for gpgme with pkg-config before gpgme-config 2019-03-19 14:05:53 +10:00
libarchive-compat.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
log.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
log.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
Makefile.am autotools: distribute meson files 2019-10-04 11:25:48 +10:00
meson.build Remove support for deltas from libalpm 2019-03-07 11:12:12 +10:00
package.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
package.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
pkghash.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
pkghash.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
rawstr.c Remove all modelines from the project 2018-05-14 09:59:15 +10:00
remove.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
remove.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
signing.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
signing.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
sync.c Do not download files if find_dl_candidates() fails 2020-03-05 16:15:44 +10:00
sync.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
trans.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
trans.h build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00
util-common.c Split common utility functions for libalpm and pacman 2013-01-04 21:49:37 +10:00
util-common.h Split common utility functions for libalpm and pacman 2013-01-04 21:49:37 +10:00
util.c Add REALLOC macro to simplify realloc error handling 2020-04-13 23:44:46 +10:00
util.h Add REALLOC macro to simplify realloc error handling 2020-04-13 23:44:46 +10:00
version.c build-aux/update-copyright 2019 2020 2020-02-10 10:46:03 +10:00