aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-04-12 11:31:45 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-04-12 17:20:24 -0300
commit27b5ef3975e22c7d62e8dbe780dc75607e36eb43 (patch)
treec611c4814d5874c59bbc02902579b7c0ee0aeeed /src
parent0248c75bc190ec2fbc8f3af3d61f771e76d628d6 (diff)
downloadrneovim-27b5ef3975e22c7d62e8dbe780dc75607e36eb43.tar.gz
rneovim-27b5ef3975e22c7d62e8dbe780dc75607e36eb43.tar.bz2
rneovim-27b5ef3975e22c7d62e8dbe780dc75607e36eb43.zip
eval: Fix memory deallocation of JobEvent
This causes a "read after free" error when kmp_free is replaced by `free`.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index a3ef24f295..7e020a9bce 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -20313,11 +20313,11 @@ static void on_job_event(Event event)
clear_tv(&rettv);
end:
- kmp_free(JobEventPool, job_event_pool, ev);
if (!ev->received) {
// exit event, safe to free job data now
term_job_data_decref(ev->data);
}
+ kmp_free(JobEventPool, job_event_pool, ev);
}
static void script_host_eval(char *name, typval_T *argvars, typval_T *rettv)