diff --git a/libpkg/pkg_add.c b/libpkg/pkg_add.c index 0b45b4e65..262476403 100644 --- a/libpkg/pkg_add.c +++ b/libpkg/pkg_add.c @@ -1558,6 +1558,8 @@ pkg_add_common(struct pkgdb *db, const char *path, unsigned flags, } cleanup: + tll_free(symlinks_allowed); + if (openxact) pkgdb_register_finale(db, retcode, NULL); if (a != NULL) { diff --git a/libpkg/pkgdb.c b/libpkg/pkgdb.c index 91c982184..ed5f4a482 100644 --- a/libpkg/pkgdb.c +++ b/libpkg/pkgdb.c @@ -1609,7 +1609,10 @@ run_prstmt(sql_prstmt_index s, ...) va_end(ap); - dbg(4, "running '%s'", sqlite3_expanded_sql(stmt)); + char *debug_sql = sqlite3_expanded_sql(stmt); + dbg(4, "running '%s'", debug_sql); + sqlite3_free(debug_sql); + retcode = sqlite3_step(stmt); return (retcode); diff --git a/src/event.c b/src/event.c index d33c6227a..b2b4df806 100644 --- a/src/event.c +++ b/src/event.c @@ -698,7 +698,7 @@ event_callback(void *data, struct pkg_event *ev) evtmp = it->item; if (evtmp->cb == ev->e_cleanup_callback.cleanup_cb && evtmp->data == ev->e_cleanup_callback.data) { - tll_remove(cleanup_list, it); + tll_remove_and_free(cleanup_list, it, free); break; } }