aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/shell.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-04-13 09:30:57 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-04-13 09:30:57 -0300
commita9ee85b9fc2d4e3faa466e9c3062cd41315f8456 (patch)
treee45187575c9f0397c5d717780b61adf5b3976a62 /src/nvim/os/shell.c
parent0248c75bc190ec2fbc8f3af3d61f771e76d628d6 (diff)
parent2d104f14dbd2c60a30e9e1e0fef098b39db087db (diff)
downloadrneovim-a9ee85b9fc2d4e3faa466e9c3062cd41315f8456.tar.gz
rneovim-a9ee85b9fc2d4e3faa466e9c3062cd41315f8456.tar.bz2
rneovim-a9ee85b9fc2d4e3faa466e9c3062cd41315f8456.zip
Merge PR #2415 'Use jemalloc instead of libc allocator'
Diffstat (limited to 'src/nvim/os/shell.c')
-rw-r--r--src/nvim/os/shell.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index 6fcb62a5f3..4f5928ba8a 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -80,11 +80,11 @@ void shell_free_argv(char **argv)
while (*p != NULL) {
// Free each argument
- free(*p);
+ xfree(*p);
p++;
}
- free(argv);
+ xfree(argv);
}
/// Calls the user-configured 'shell' (p_sh) for running a command or wildcard
@@ -128,11 +128,11 @@ int os_call_shell(char_u *cmd, ShellOpts opts, char_u *extra_args)
emsg_silent,
forward_output);
- free(input.data);
+ xfree(input.data);
if (output) {
(void)write_output(output, nread, true, true);
- free(output);
+ xfree(output);
}
if (!emsg_silent && status != 0 && !(opts & kShellOptSilent)) {
@@ -250,7 +250,7 @@ static int shell(const char *cmd,
if (buf.len == 0) {
// no data received from the process, return NULL
*output = NULL;
- free(buf.data);
+ xfree(buf.data);
} else {
// NUL-terminate to make the output directly usable as a C string
buf.data[buf.len] = NUL;