free reference pointer, fix indentation
Merge pull request #242 from LudwigOrtmann/issue_240

free reference pointer, fix indentation