Mercurial > vim
comparison src/beval.c @ 16429:a1229400434a v8.1.1219
patch 8.1.1219: not checking for NULL return from alloc()
commit https://github.com/vim/vim/commit/6ee9658774942f7448af700fc04df0335796a3db
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 27 22:06:37 2019 +0200
patch 8.1.1219: not checking for NULL return from alloc()
Problem: Not checking for NULL return from alloc().
Solution: Add checks. (Martin Kunev, closes https://github.com/vim/vim/issues/4303, closes https://github.com/vim/vim/issues/4174)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 27 Apr 2019 22:15:05 +0200 |
parents | 41fbbcea0f1b |
children | 5ed4965ebc7b |
comparison
equal
deleted
inserted
replaced
16428:6f69ef2913d7 | 16429:a1229400434a |
---|---|
125 *textp = lbuf; | 125 *textp = lbuf; |
126 *colp = col; | 126 *colp = col; |
127 #ifdef FEAT_VARTABS | 127 #ifdef FEAT_VARTABS |
128 vim_free(beval->vts); | 128 vim_free(beval->vts); |
129 beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array); | 129 beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array); |
130 if (wp->w_buffer->b_p_vts_array != NULL && beval->vts == NULL) | |
131 return FAIL; | |
130 #endif | 132 #endif |
131 beval->ts = wp->w_buffer->b_p_ts; | 133 beval->ts = wp->w_buffer->b_p_ts; |
132 return OK; | 134 return OK; |
133 } | 135 } |
134 } | 136 } |