summaryrefslogtreecommitdiff
path: root/src/status.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/status.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/status.c')
-rw-r--r--src/status.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/status.c b/src/status.c
index c53c4acc9..1fc3794ea 100644
--- a/src/status.c
+++ b/src/status.c
@@ -229,7 +229,7 @@ static int store_if_changed(struct status_st *st, struct status_entry *e)
return git__throw(error, "Failed to process the file '%s'. It doesn't exist in the workdir, in the HEAD nor in the index", e->path);
if (e->status_flags == GIT_STATUS_CURRENT) {
- free(e);
+ git__free(e);
return GIT_SUCCESS;
}
@@ -446,7 +446,7 @@ int git_status_foreach(git_repository *repo, int (*callback)(const char *, unsig
error = git__rethrow(error, "Failed to determine statuses. User callback failed");
}
- free(e);
+ git__free(e);
}
exit:
@@ -550,7 +550,7 @@ int git_status_file(unsigned int *status_flags, git_repository *repo, const char
exit:
git_tree_close(tree);
- free(e);
+ git__free(e);
return error;
}
@@ -606,7 +606,7 @@ static int alphasorted_dirent_cb(void *state, char *full_path)
return GIT_ENOMEM;
if (git_vector_insert(entry_names, entry) < GIT_SUCCESS) {
- free(entry);
+ git__free(entry);
return GIT_ENOMEM;
}
@@ -639,7 +639,7 @@ static int alphasorted_futils_direach(
error = fn(arg, entry->path);
}
- free(entry);
+ git__free(entry);
}
git_vector_free(&entry_names);