summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-10-28 14:51:13 -0700
committerVicent Marti <tanoku@gmail.com>2011-10-28 19:02:36 -0700
commit3286c408eccb18c525ca123383f3ebf5097441bc (patch)
tree4422fe16ab4f7b9cf713e0209cbb74fb4115889e /src/fileops.c
parentda37654d04617b4dacce6e7a4796007d2854624d (diff)
downloadlibgit2-3286c408eccb18c525ca123383f3ebf5097441bc.tar.gz
global: Properly use `git__` memory wrappers
Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fileops.c b/src/fileops.c
index 203cce0a4..c8de8d83d 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -181,7 +181,7 @@ int git_futils_readbuffer_updated(git_fbuffer *obj, const char *path, time_t *mt
if (p_read(fd, buff, len) < 0) {
p_close(fd);
- free(buff);
+ git__free(buff);
return git__throw(GIT_ERROR, "Failed to read file `%s`", path);
}
buff[len] = '\0';
@@ -207,7 +207,7 @@ int git_futils_readbuffer(git_fbuffer *obj, const char *path)
void git_futils_freebuffer(git_fbuffer *obj)
{
assert(obj);
- free(obj->data);
+ git__free(obj->data);
obj->data = NULL;
}
@@ -326,7 +326,7 @@ int git_futils_mkdir_r(const char *path, int mode)
error = GIT_SUCCESS;
}
- free(path_copy);
+ git__free(path_copy);
if (error < GIT_SUCCESS)
return git__throw(error, "Failed to recursively create `%s` tree structure", path);