Thread (1 message) 1 message, 1 author, 2019-01-22

Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

From: Junio C Hamano <hidden>
Date: 2019-01-22 23:05:37

Patrick Hogg [off-list ref] writes:
quoted hunk
@@ -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;
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help