summaryrefslogtreecommitdiff
path: root/src/path.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-09-17 03:19:40 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-09-17 03:19:40 +0200
commit25abbc27a77895e2f2316ed307b51e628d85f15c (patch)
tree1fc915d958e07ce2cd8b523deb53c0c626c55f66 /src/path.c
parentecef28d55c7d72dda0e33649614f2b20db482cd6 (diff)
downloadlibgit2-25abbc27a77895e2f2316ed307b51e628d85f15c.tar.gz
Clean up some leaks in the test suite
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/path.c b/src/path.c
index d29b992fe..760efec12 100644
--- a/src/path.c
+++ b/src/path.c
@@ -1088,8 +1088,10 @@ int git_path_dirload(
entry_path[path_len] = '/';
memcpy(&entry_path[path_len + need_slash], de_path, de_len);
- if ((error = git_vector_insert(contents, entry_path)) < 0)
+ if ((error = git_vector_insert(contents, entry_path)) < 0) {
+ git__free(entry_path);
break;
+ }
}
closedir(dir);