Check for failure of realloc
Merge pull request #11 from elliotkendall/realloc

Check for failure of realloc