Commit 909d120e02559eff42cb73dc284653b57b541660

Stefan Sperling 2019-09-22T15:21:26

missing errer check in update_blob(); found by jj@ with scan-build

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/worktree.c b/lib/worktree.c
index 5f97bf0..9fc13a8 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -1271,6 +1271,8 @@ update_blob(struct got_worktree *worktree,
 		    progress_cb, progress_arg);
 		if (blob2)
 			got_object_blob_close(blob2);
+		if (err)
+			goto done;
 		/*
 		 * Do not update timestamps of files with local changes.
 		 * Otherwise, a future status walk would treat them as