mohawkjohn/nmatrix — pull request #10 by cjfuller (2013-11-05 19:09:39+00:00)
Title: Fix additional read after free issues related to registration

Two additional problems cropped up:
- Some of the list insert/replace methods can free a node while it's still
registered. Added a completely_unregister method to get rid of all
instances of a VALUE in the registration stack. Use with caution (probably
only just before something is freed) as this can mess up the registration
scheme if used improperly.

- Found an if/else mismatch in list slice_copy where the else was associated
with the wrong if statement after introducing registration code. Put the
else back with the correct if by addition of braces.

This fixes all of the list-related valgrind problems for me.