Thread (1 message) 1 message, 1 author, 2024-08-05

Re: [PATCH] repository: prevent memory leak when releasing ref stores

From: Junio C Hamano <hidden>
Date: 2024-08-05 17:42:08

Sven Strickroth [off-list ref] writes:
Am 05.08.2024 um 12:56 schrieb Sven Strickroth via GitGitGadget:
quoted
-	strmap_for_each_entry(&repo->submodule_ref_stores, &iter, e)
+	strmap_for_each_entry(&repo->submodule_ref_stores, &iter, e) {
  		ref_store_release(e->value);
+		free(e->value);
+	}
  	strmap_clear(&repo->submodule_ref_stores, 1);
After further checking this does not seem to be necessary. The ref
stores are already free'd in strmap_clear.
Is it "not necessary" or "actively harmful"?  It sounds like the
latter?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help