Thread (1 message) 1 message, 1 author, 2022-07-21

Re: [PATCH v3 26/26] submodule--helper: fix a configure_added_submodule() leak

From: Junio C Hamano <hidden>
Date: 2022-07-21 21:52:06

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted hunk
 static void configure_added_submodule(struct add_data *add_data)
 {
 	char *key;
-	char *val = NULL;
+	const char *val;
 	struct child_process add_submod = CHILD_PROCESS_INIT;
 	struct child_process add_gitmodules = CHILD_PROCESS_INIT;
 
@@ -3306,7 +3306,7 @@ static void configure_added_submodule(struct add_data *add_data)
 	 * is_submodule_active(), since that function needs to find
 	 * out the value of "submodule.active" again anyway.
 	 */
-	if (!git_config_get_string("submodule.active", &val)) {
+	if (!git_config_get_string_tmp("submodule.active", &val)) {
Obviously correct ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help