Commit Diff


commit - 3affba96cf2f8128eea9145e7f67e254dfde02df
commit + 8e158b0141b7625e7db96d7ff32f7312b08d2740
blob - bc507c2e7bd69941d2a5a4e2b676a5b0762e0782
blob + e9a814c992d4c6755b06762f4d3e2ad3ca23f46e
--- got/got.c
+++ got/got.c
@@ -675,6 +675,7 @@ cmd_import(int argc, char *argv[])
 		error = get_editor(&editor);
 		if (error)
 			goto done;
+		free(logmsg);
 		error = collect_import_msg(&logmsg, editor, path_dir, refname);
 		if (error)
 			goto done;
@@ -722,6 +723,7 @@ cmd_import(int argc, char *argv[])
 	printf("Created branch %s with commit %s\n",
 	    got_ref_get_name(branch_ref), id_str);
 done:
+	free(logmsg);
 	free(repo_path);
 	free(editor);
 	free(refname);