Fix minor memory issues

The first line fixes a crash on start in Carla (but there's still another crash later on).
The other two lines properly frees memory created using "new".