Skip to content

Commit

Permalink
More leak fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keve authored and bapt committed Nov 30, 2024
1 parent 0d4f404 commit 66e26ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions libpkg/pkg_add.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion libpkg/pkgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 66e26ae

Please sign in to comment.