diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2005-04-08 19:22:00 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-04-08 19:22:00 +0000 |
commit | 405d3c9a9f19a9a8b00ddaf9babfa97c083bd735 (patch) | |
tree | 22242bdd4e3dd9daa934f52b2913655dfb709b7d /lib/libalpm | |
parent | 761b21d8ae258981c5537fdcb1ea0b9ac135be0d (diff) | |
download | pacman-405d3c9a9f19a9a8b00ddaf9babfa97c083bd735.tar.xz |
fixed a potential segfault
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/add.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 07b16dec..bd6b1724 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -120,12 +120,12 @@ int add_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data) { PMList *lp; - *data = NULL; - ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1)); ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1)); ASSERT(data != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1)); + *data = NULL; + /* Check dependencies */ |