From: Junio C Hamano Date: Tue, 22 Jan 2019 23:05:30 GMT Subject: Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects Message-ID: In-Reply-To: <20190118022736.36832-1-phogg@novamoon.net> Patrick Hogg writes: > @@ -3319,6 +3327,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) > OPT_END(), > }; > > + init_read_mutex(); > + > if (DFS_NUM_STATES > (1 << OE_DFS_STATE_BITS)) > BUG("too many dfs states, increase OE_DFS_STATE_BITS"); > > @@ -3495,5 +3505,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) > _("Total %"PRIu32" (delta %"PRIu32")," > " reused %"PRIu32" (delta %"PRIu32")"), > written, written_delta, reused, reused_delta); > + > + cleanup_read_mutex(); This is insufficient, isn't it? There is "return 0" just above the pre-context of this hunk which should probably be made to "goto clean_exit" or something, with a new label "clean_exit:" just in front of this new call to cleaup. > return 0; > }