free double pointers correctly
Merge pull request #2 from steven-murray/master

free double pointers correctly