aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/terminal.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/terminal.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/terminal.c')
-rw-r--r--src/nvim/terminal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index ea0cc88e58..8ee47b2642 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -243,7 +243,7 @@ Terminal *terminal_open(TerminalOptions opts)
char *name = get_config_string(rv, var);
if (name) {
color_val = name_to_color((uint8_t *)name);
- free(name);
+ xfree(name);
if (color_val != -1) {
rv->colors[i] = color_val;
@@ -424,11 +424,11 @@ void terminal_destroy(Terminal *term)
term->buf = NULL;
pmap_del(ptr_t)(invalidated_terminals, term);
for (size_t i = 0 ; i < term->sb_current; i++) {
- free(term->sb_buffer[i]);
+ xfree(term->sb_buffer[i]);
}
- free(term->sb_buffer);
+ xfree(term->sb_buffer);
vterm_free(term->vt);
- free(term);
+ xfree(term);
}
void terminal_send(Terminal *term, char *data, size_t size)
@@ -603,7 +603,7 @@ static int term_sb_push(int cols, const VTermScreenCell *cells, void *data)
// Recycle old row if it's the right size
sbrow = term->sb_buffer[term->sb_current - 1];
} else {
- free(term->sb_buffer[term->sb_current - 1]);
+ xfree(term->sb_buffer[term->sb_current - 1]);
}
memmove(term->sb_buffer + 1, term->sb_buffer,
@@ -664,7 +664,7 @@ static int term_sb_pop(int cols, VTermScreenCell *cells, void *data)
cells[col].chars[0] = 0;
cells[col].width = 1;
}
- free(sbrow);
+ xfree(sbrow);
pmap_put(ptr_t)(invalidated_terminals, term, NULL);
return 1;