Commit Diff


commit - 7f11502cb5629607446cbb42652120095794f8e0
commit + cdb8f1fa33c26cc381af648690c3f8cc4380175f
blob - c175b73a7f6b103afe3ff4d34260aae5be101cfc
blob + 54de181c72e65698c248f4642fb3545e3491cf0a
--- lib/reference.c
+++ lib/reference.c
@@ -123,6 +123,7 @@ alloc_symref(struct got_reference **ref, const char *n
 		err = got_error_from_errno("strdup");
 		got_ref_close(*ref);
 		*ref = NULL;
+		return err;
 	}
 	(*ref)->ref.symref.ref = strdup(target_ref);
 	if ((*ref)->ref.symref.ref == NULL) {