plug resource leaks in case of errors
modified libpkg/fetch.c
@@ -579,8 +579,8 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest,
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -595,6 +595,7 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest,
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -682,9 +683,6 @@ cleanup:
|
|
|
|
|
|
| - | |
| - | |
| - | |
|
|
|
|
|
modified libpkg/pkg_config.c
@@ -945,8 +945,9 @@ pkg_ini(const char *path, const char *reposdir, pkg_init_flags flags)
|
|
|
|
|
|
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -977,13 +978,12 @@ pkg_ini(const char *path, const char *reposdir, pkg_init_flags flags)
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
modified libpkg/pkg_create.c
@@ -86,6 +86,7 @@ pkg_create_from_dir(struct pkg *pkg, const char *root,
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified libpkg/pkg_ports.c
@@ -890,7 +890,7 @@ apply_keyword_file(ucl_object_t *obj, struct plist *p, char *line, struct file_a
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -915,7 +915,7 @@ apply_keyword_file(ucl_object_t *obj, struct plist *p, char *line, struct file_a
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -923,7 +923,7 @@ apply_keyword_file(ucl_object_t *obj, struct plist *p, char *line, struct file_a
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -931,7 +931,7 @@ apply_keyword_file(ucl_object_t *obj, struct plist *p, char *line, struct file_a
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -939,7 +939,7 @@ apply_keyword_file(ucl_object_t *obj, struct plist *p, char *line, struct file_a
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -947,7 +947,7 @@ apply_keyword_file(ucl_object_t *obj, struct plist *p, char *line, struct file_a
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -959,7 +959,7 @@ apply_keyword_file(ucl_object_t *obj, struct plist *p, char *line, struct file_a
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -977,9 +977,11 @@ apply_keyword_file(ucl_object_t *obj, struct plist *p, char *line, struct file_a
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -1285,6 +1287,7 @@ ports_parse_plist(struct pkg *pkg, const char *plist, const char *stage)
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified libpkg/pkg_repo_create.c
@@ -301,6 +301,7 @@ pkg_create_repo_worker(struct pkg_fts_item *start, size_t nelts,
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -308,6 +309,7 @@ pkg_create_repo_worker(struct pkg_fts_item *start, size_t nelts,
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -946,12 +948,9 @@ pkg_repo_pack_db(const char *name, const char *archive, char *path,
|
|
|
|
|
|
| - | |
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
@@ -976,6 +975,7 @@ pkg_repo_pack_db(const char *name, const char *archive, char *path,
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified libpkg/pkg_solve.c
@@ -702,8 +702,10 @@ pkg_solve_add_chain_rule(struct pkg_solve_problem *problem,
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
modified libpkg/scripts.c
@@ -86,8 +86,10 @@ pkg_script_run(struct pkg * const pkg, pkg_script type)
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
modified src/audit.c
@@ -218,25 +218,30 @@ exec_audit(int argc, char **argv)
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -260,6 +265,7 @@ exec_audit(int argc, char **argv)
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified src/register.c
@@ -160,6 +160,7 @@ exec_register(int argc, char **argv)
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified src/rquery.c
@@ -211,20 +211,31 @@ exec_rquery(int argc, char **argv)
|
|
|
|
|
|
| + | |
| + | |
|
|
| - | |
| + | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
@@ -233,8 +244,11 @@ exec_rquery(int argc, char **argv)
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
@@ -251,8 +265,11 @@ exec_rquery(int argc, char **argv)
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
@@ -273,6 +290,8 @@ exec_rquery(int argc, char **argv)
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
modified src/set.c
@@ -193,6 +193,7 @@ exec_set(int argc, char **argv)
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified src/version.c
@@ -336,8 +336,13 @@ hash_indexfile(const char *indexfilename)
|
|
|
|
|
|
| - | |
| + | |
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|