Commit Diff


commit - a310d9c3a96d8b9ec72eb3fe1f2251b8ba5aa61f
commit + eff568509962015d1495b29d30e8375b7ee427e4
blob - 1f78b772985528812977992b4f114463433ce59e
blob + 11e392eb0efbb98ce85ecbfda9488b3f1373f483
--- libexec/got-send-pack/got-send-pack.c
+++ libexec/got-send-pack/got-send-pack.c
@@ -389,6 +389,9 @@ send_pack(int fd, struct got_pathlist_head *refs,
 			goto done;
 
 		err = got_pathlist_append(&their_refs, refname, id);
+		if (err)
+			goto done;
+
 		if (chattygot)
 			fprintf(stderr, "%s: remote has %s %s\n",
 			    getprogname(), refname, id_str);