summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apk.c5
-rw-r--r--src/del.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/apk.c b/src/apk.c
index 6cd4a5a..0abc7cc 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -460,6 +460,7 @@ int main(int argc, char **argv)
const struct apk_option_group **optgroups = default_optgroups;
struct apk_string_array *args;
+ apk_string_array_init(&args);
#ifdef TEST_MODE
apk_string_array_init(&test_repos);
#endif
@@ -585,7 +586,6 @@ int main(int argc, char **argv)
}
#endif
- apk_string_array_init(&args);
apk_string_array_resize(&args, argc);
memcpy(args->item, argv, argc * sizeof(*argv));
@@ -602,5 +602,8 @@ err:
free(ctx);
fetchConnectionCacheClose();
+ apk_string_array_free(&args);
+ free(apk_argv);
+
return r;
}
diff --git a/src/del.c b/src/del.c
index 1c43883..5756a3a 100644
--- a/src/del.c
+++ b/src/del.c
@@ -151,6 +151,7 @@ static int del_main(void *pctx, struct apk_database *db, struct apk_string_array
} else {
apk_solver_print_errors(db, &changeset, ctx->world);
}
+ apk_change_array_free(&changeset.changes);
apk_dependency_array_free(&ctx->world);
return r;