diff options
author | Dan McGee <dan@archlinux.org> | 2008-01-11 00:01:58 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-11 00:01:58 -0600 |
commit | ccc1c731529de16f6fa4064fd992a8f63d7cfc26 (patch) | |
tree | dc5b96634cb255cfcbee1e57079d32491db9fc5e /lib/libalpm/remove.c | |
parent | 0a65de10b1cd8bd450e47e735cb909eec13822d0 (diff) | |
download | pacman-ccc1c731529de16f6fa4064fd992a8f63d7cfc26.tar.xz |
Use dynamic string allocation in package structures
This also affects all structures with static strings, such as depmiss,
conflict, etc. This should help a lot with memory usage, and hopefully make
things a bit more "idiot proof".
Currently our pactest pass/fail rate is identical before and after this
patch. This is not to say it is a perfect patch- I have yet to pull valgrind
out. However, this should be quite safe to use in all situations from here
on out, and we can start plugging the memleaks.
Original-work-by: Aaron Griffin <aaronmgriffin@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r-- | lib/libalpm/remove.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 4f6d6473..a94848b5 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -120,7 +120,8 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data) miss->target); } } - FREELIST(lp); + alpm_list_free_inner(lp, (alpm_list_fn_free)_alpm_depmiss_free); + alpm_list_free(lp); lp = alpm_checkdeps(db, 1, trans->packages, NULL); } } else { |