Why is this program leaking memory ?