diff --git a/src/register.c b/src/register.c index a20e5c1d0f..0215f0153d 100644 --- a/src/register.c +++ b/src/register.c @@ -352,6 +352,16 @@ get_register( { reg->y_array[i].string = vim_strnsave(y_current->y_array[i].string, y_current->y_array[i].length); + if (reg->y_array[i].string == NULL) + { + // The allocation failed so clean up and exit + while (--i >= 0) + vim_free(reg->y_array[i].string); + vim_free(reg->y_array); + vim_free(reg); + return (void *)NULL; + } + reg->y_array[i].length = y_current->y_array[i].length; } } diff --git a/src/version.c b/src/version.c index 2eb306c56b..2f48f475e9 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 353, /**/ 352, /**/