summaryrefslogtreecommitdiff
path: root/src/path.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-02-23 10:02:44 +0100
committerPatrick Steinhardt <ps@pks.im>2016-02-23 11:50:23 +0100
commit42c05ed56b3bc4f5963a8c68ec6fec803b7e22e3 (patch)
treedc006d8bb64f6fe456e37e0d33e8a5fab28e2cd1 /src/path.c
parent859ed5ddc7dc0e208215079265fb012eb8b48048 (diff)
downloadlibgit2-42c05ed56b3bc4f5963a8c68ec6fec803b7e22e3.tar.gz
path: use GITERR_CHECK_ALLOC_BUF to verify passed in buffer
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/path.c b/src/path.c
index 852ef576a..1fd14fcb9 100644
--- a/src/path.c
+++ b/src/path.c
@@ -705,8 +705,7 @@ int git_path_resolve_relative(git_buf *path, size_t ceiling)
char *base, *to, *from, *next;
size_t len;
- if (!path || git_buf_oom(path))
- return -1;
+ GITERR_CHECK_ALLOC_BUF(path);
if (ceiling > path->size)
ceiling = path->size;