mirror of
				https://github.com/vim/vim.git
				synced 2025-10-31 09:57:14 -04:00 
			
		
		
		
	patch 9.1.0195: memleak with ex_drop, NULL dereference
Problem:  memleak with ex_drop(), NULL dereference
          (zeertzjq)
Solution: revert back to ex_rewind(), use curbuf instead of buf
fixes: #14246
closes: #14251
Signed-off-by: Christian Brabandt <cb@256bit.org>
			
			
This commit is contained in:
		| @@ -5503,8 +5503,8 @@ ex_drop(exarg_T *eap) | |||||||
| 		buf_check_timestamp(curbuf, FALSE); | 		buf_check_timestamp(curbuf, FALSE); | ||||||
| 		curbuf->b_p_ar = save_ar; | 		curbuf->b_p_ar = save_ar; | ||||||
| 	    } | 	    } | ||||||
| 	    if (buf->b_ml.ml_flags & ML_EMPTY) | 	    if (curbuf->b_ml.ml_flags & ML_EMPTY) | ||||||
| 		open_buffer(FALSE, eap, 0); | 		ex_rewind(eap); | ||||||
| 	    return; | 	    return; | ||||||
| 	} | 	} | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -704,6 +704,8 @@ static char *(features[]) = | |||||||
|  |  | ||||||
| static int included_patches[] = | static int included_patches[] = | ||||||
| {   /* Add new patch number below this line */ | {   /* Add new patch number below this line */ | ||||||
|  | /**/ | ||||||
|  |     195, | ||||||
| /**/ | /**/ | ||||||
|     194, |     194, | ||||||
| /**/ | /**/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user