This is the same piece as before (lines 2904-2904).

```c
vim_free(confirm_msg);
confirm_msg = alloc(len);
```

We suggested to become:

```c
confirm_msg = xrealloc(confirm_msg, len);
```

But actually it's not entirely the same, as `xrealloc` will copy the old bytes as well. This most likely wouldn't change the observed behaviour, but it might be a bit slower (`realloc` always returns a new object, or so I've read). What do you think, @philix.

So maybe it should be:

```c
free(confirm_msg);
confirm_msg = xmalloc(len);
```

Also stumbled upon this when looking for what the standard says about calling `realloc` with a smaller size @philix: http://stackoverflow.com/a/9575288. Boy are we lucky our implementation doesn't suffer from such hard to see bugs ;).

Also, yes, for allocation always use the calls in `memory.h`, for freeing always just use `free()`.