Commit Diff


commit - f97edf0cbcf2ee1ea1d71a162699f0be79bd0400
commit + c9e76cc42e880db2e858c1e99942214157bd7ea9
blob - e7a5a2312e750051effc62220e0e5ca92cdd0a24
blob + 05652e3057827e3b2c8cc76f5e95d07a081979a7
--- lib/object_create.c
+++ lib/object_create.c
@@ -454,8 +454,10 @@ got_object_commit_create(struct got_object_id **id,
 	}
 
 	if (asprintf(&author_str, "%s%s %lld +0000\n",
-	    GOT_COMMIT_LABEL_AUTHOR, author, (long long)author_time) == -1)
-		return got_error_from_errno("asprintf");
+	    GOT_COMMIT_LABEL_AUTHOR, author, (long long)author_time) == -1) {
+		err = got_error_from_errno("asprintf");
+		goto done;
+	}
 
 	if (asprintf(&committer_str, "%s%s %lld +0000\n",
 	    GOT_COMMIT_LABEL_COMMITTER, committer ? committer : author,