diff options
author | morganamilo <morganamilo@archlinux.org> | 2021-05-09 14:18:38 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2021-05-09 14:54:20 +0200 |
commit | 4fead44e3ce97d3a83ca6bab393d480746ba9227 (patch) | |
tree | 33ea7561d706a5b0951638e021becca6049c3b30 /lib/libalpm/alpm.h | |
parent | 15be417c17809cbf2721a3fb0c519ee910b8d0a6 (diff) | |
download | pacman-4fead44e3ce97d3a83ca6bab393d480746ba9227.tar.gz pacman-4fead44e3ce97d3a83ca6bab393d480746ba9227.tar.xz |
libalpm: clone data on alpm_db_set_servers
Every alpm_option_set function clones the input so lets be more
consistent. Also this fixes servers not being sanatized.
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r-- | lib/libalpm/alpm.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 101d686b..83bd9f91 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1311,10 +1311,9 @@ int alpm_db_get_valid(alpm_db_t *db); alpm_list_t *alpm_db_get_servers(const alpm_db_t *db); /** Sets the list of servers for the database to use. - * @param db the database to set the servers - * @param servers a char* list of servers. Note: the database will - * take ownership of the list and it should no longer be - * freed by the caller + * @param db the database to set the servers. The list will be duped and + * the original will still need to be freed by the caller. + * @param servers a char* list of servers. */ int alpm_db_set_servers(alpm_db_t *db, alpm_list_t *servers); |