Fix a couple of blatant memory leaks; thanks to Ruurd Beerstra for