commit bc5e881ab9b3f23c4c4d00845d2e553d4fcd7e56 from: Stefan Sperling date: Wed Mar 23 20:55:26 2022 UTC plug a memory leak in got_fetch_pack(); patch by Mikhail commit - 08d508671c852e8968d71eba2642ee1934469425 commit + bc5e881ab9b3f23c4c4d00845d2e553d4fcd7e56 blob - e557ed1517eb0150936c27521720d73e1dc76d88 blob + c6a947cc4002d0ef7d26469a37cfd819bb827897 --- lib/fetch.c +++ lib/fetch.c @@ -500,6 +500,8 @@ got_fetch_pack(struct got_object_id **pack_hash, struc err = got_error_from_errno("asprintf"); goto done; } + free(id_str); + id_str = NULL; if (rename(tmppackpath, packpath) == -1) { err = got_error_from_errno3("rename", tmppackpath, packpath); @@ -534,6 +536,7 @@ done: free(tmppackpath); free(tmpidxpath); free(idxpath); + free(id_str); free(packpath); free(progress);