revwalk: use GITERR_CHECK_ALLOC_BUF

This commit is contained in:
Patrick Steinhardt 2016-02-23 11:48:30 +01:00
parent 6e2a37556d
commit c5bd70d138

View File

@ -223,8 +223,7 @@ static int push_glob(git_revwalk *walk, const char *glob, int hide)
git_buf_joinpath(&buf, GIT_REFS_DIR, glob); git_buf_joinpath(&buf, GIT_REFS_DIR, glob);
else else
git_buf_puts(&buf, glob); git_buf_puts(&buf, glob);
if (git_buf_oom(&buf)) GITERR_CHECK_ALLOC_BUF(&buf);
return -1;
/* If no '?', '*' or '[' exist, we append '/ *' to the glob */ /* If no '?', '*' or '[' exist, we append '/ *' to the glob */
wildcard = strcspn(glob, "?*["); wildcard = strcspn(glob, "?*[");