neovim/neovim — pull request #1679 by oni-link (2014-12-15 19:18:03+00:00)
Title: [RFC] Fix for clang analyzer warning in ops.c

Fix warning: ops.c: read_viminfo_register(): Dereference of null pointer: RI.

Problem : Array access (via field 'y_array') results in a null pointer
dereference @ 4487.

Diagnostic : Real issue.

Rationale : If the array was previously freed and the size of the array
(`y_current->y_size`) was not updated to zero, the loop @4486
could be entered and a `NULL` pointer would be dereferenced.

Resolution : Use `free_yank_all()` to take care of the `NULL` check and
to free the current yank register.