diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-10-28 14:51:13 -0700 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-10-28 19:02:36 -0700 |
| commit | 3286c408eccb18c525ca123383f3ebf5097441bc (patch) | |
| tree | 4422fe16ab4f7b9cf713e0209cbb74fb4115889e /src/filebuf.c | |
| parent | da37654d04617b4dacce6e7a4796007d2854624d (diff) | |
| download | libgit2-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/filebuf.c')
| -rw-r--r-- | src/filebuf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/filebuf.c b/src/filebuf.c index 1a98e3f43..3f57d295d 100644 --- a/src/filebuf.c +++ b/src/filebuf.c @@ -63,13 +63,13 @@ void git_filebuf_cleanup(git_filebuf *file) if (file->digest) git_hash_free_ctx(file->digest); - free(file->buffer); - free(file->z_buf); + git__free(file->buffer); + git__free(file->z_buf); deflateEnd(&file->zs); - free(file->path_original); - free(file->path_lock); + git__free(file->path_original); + git__free(file->path_lock); } GIT_INLINE(int) flush_buffer(git_filebuf *file) @@ -248,7 +248,7 @@ int git_filebuf_hash(git_oid *oid, git_filebuf *file) int git_filebuf_commit_at(git_filebuf *file, const char *path) { - free(file->path_original); + git__free(file->path_original); file->path_original = git__strdup(path); if (file->path_original == NULL) return GIT_ENOMEM; @@ -368,12 +368,12 @@ int git_filebuf_printf(git_filebuf *file, const char *format, ...) va_end(arglist); if (len < 0) { - free(tmp_buffer); + git__free(tmp_buffer); return git__throw(GIT_EOSERR, "Failed to format string"); } error = git_filebuf_write(file, tmp_buffer, len); - free(tmp_buffer); + git__free(tmp_buffer); return error; } |
