Commit Diff


commit - a16d97bdc65b49050d622450d50642fa98eb3cc1
commit + 5546d4669ccce281a6f6f89ccf204e671ed0d3a9
blob - 70cbc4d43a85f0b9cc32a0e589ac0f020b385ca1
blob + 821074bee10bd2aec44fc5e2732eb33c5b157f6f
--- lib/worktree.c
+++ lib/worktree.c
@@ -3144,6 +3144,7 @@ check_merge_ok(void *arg, struct got_fileindex_entry *
 
 	/* Reject merges into a work tree with conflicted files. */
 	err = get_file_status(&status, &sb, ie, ondisk_path, -1, NULL, a->repo);
+	free(ondisk_path);
 	if (err)
 		return err;
 	if (status == GOT_STATUS_CONFLICT)