fix #329

Ignore-this: af51db0ee32fbb87c6aec8dd1b85c3ec

Fixed a call to free with an invalid pointer.

darcs-hash:20130205042720-c41ad-a76522153737d924d2f6b33d589c89f2774fde82.gz