diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-06-05 22:51:41 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-06-16 01:40:28 -0300 |
commit | 238fa72884d0d3bcd268b0039ca4c3f62be03f15 (patch) | |
tree | a3551844092da365015e86f509c95be199752271 /src/nvim/undo.c | |
parent | 3cb3c20b7451ef4a7bc857026e2bc28b171fbb0f (diff) | |
download | rneovim-238fa72884d0d3bcd268b0039ca4c3f62be03f15.tar.gz rneovim-238fa72884d0d3bcd268b0039ca4c3f62be03f15.tar.bz2 rneovim-238fa72884d0d3bcd268b0039ca4c3f62be03f15.zip |
No OOM for list_alloc()
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 5d8fb4d5e1..37fa150aee 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -2735,13 +2735,11 @@ void u_eval_tree(u_header_T *first_uhp, list_T *list) dict_add_nr_str(dict, "save", uhp->uh_save_nr, NULL); if (uhp->uh_alt_next.ptr != NULL) { - list_T *alt_list = list_alloc(); + list_T *alt_list = list_alloc(); - if (alt_list != NULL) { - /* Recursive call to add alternate undo tree. */ - u_eval_tree(uhp->uh_alt_next.ptr, alt_list); - dict_add_list(dict, "alt", alt_list); - } + /* Recursive call to add alternate undo tree. */ + u_eval_tree(uhp->uh_alt_next.ptr, alt_list); + dict_add_list(dict, "alt", alt_list); } list_append_dict(list, dict); |