"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Mark Jamsek <mark@jamsek.com>
Subject:
free cwd in cmd_{backout,cherrypick}
To:
Game of Trees <gameoftrees@openbsd.org>
Date:
Tue, 31 Jan 2023 22:28:09 +1100

Download raw body.

Thread
I spotted this in the recent logmsg ref work and nearly forgot about it!

We forget to free cwd in cmd_backout() and cmd_cherrypick()

diff /home/mark/src/got
commit - 0d98195bc8c97f44f5635b97b8020dd934f677f0
path + /home/mark/src/got
blob - 5d94c4ade9d0584ccb4b04bf99cb1c7f8a4d8745
file + got/got.c
--- got/got.c
+++ got/got.c
@@ -10146,6 +10146,7 @@ done:
 	}
 	print_merge_progress_stats(&upa);
 done:
+	free(cwd);
 	if (commit)
 		got_object_commit_close(commit);
 	free(commit_id_str);
@@ -10290,6 +10291,7 @@ done:
 	}
 	print_merge_progress_stats(&upa);
 done:
+	free(cwd);
 	if (commit)
 		got_object_commit_close(commit);
 	free(commit_id_str);

-- 
Mark Jamsek <fnc.bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68