Commit Diff


commit - c6e52065d2d29f5a1100b031055492a4389193449ebaf1850d219f3bb0bd0e24
commit + a966183f12546a7832602b3a25db7384660951d9fe66ee5d733de24ebf2665e6
blob - bb2d9306775d073ffeffb52482d8422bf536d1e140c19cfc37b24a6c2d8864e0
blob + ef3a9db75044c6f7d79d6b6a0da8ef8a45000839bea8c622222e02e2a8c451df
--- lib/patch.c	
+++ lib/patch.c	
@@ -1154,8 +1154,10 @@ done:
 		got_object_commit_close(commit);
 	if (fd != -1 && close(fd) == -1 && err == NULL)
 		err = got_error_from_errno("close");
-	if (ibuf != NULL)
+	if (ibuf != NULL) {
 		imsgbuf_clear(ibuf);
+		free(ibuf);
+	}
 	if (imsg_fds[0] != -1 && close(imsg_fds[0]) == -1 && err == NULL)
 		err = got_error_from_errno("close");
 	if (imsg_fds[1] != -1 && close(imsg_fds[1]) == -1 && err == NULL)