summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);