commit 69185643da8c9e26b4e750f5c35826f2fe7baf21 from: Stefan Sperling date: Fri Jul 12 14:09:08 2019 UTC remove unused variable in commit_worktree() commit - a0e95631a63326f9bab9ef945028cad102c636b5 commit + 69185643da8c9e26b4e750f5c35826f2fe7baf21 blob - 01e747a83ade82a0af24a2d563a9013cb39d0cd7 blob + cf366734e6044f881d3e6bab9f46c2e480adc68e --- lib/worktree.c +++ lib/worktree.c @@ -3244,7 +3244,6 @@ commit_worktree(struct got_object_id **new_commit_id, const struct got_error *err = NULL, *unlockerr = NULL; struct got_pathlist_entry *pe; const char *head_ref_name = NULL; - struct got_reference *head_ref = NULL; struct got_commit_object *head_commit = NULL; struct got_reference *head_ref2 = NULL; struct got_object_id *head_commit_id2 = NULL; @@ -3360,8 +3359,6 @@ done: if (head_commit) got_object_commit_close(head_commit); free(head_commit_id2); - if (head_ref) - got_ref_close(head_ref); if (head_ref2) { unlockerr = got_ref_unlock(head_ref2); if (unlockerr && err == NULL)