Fix invalid free.

Don't know how this never blew up until today, with a little innocuous testing patch, after the who-knows-how-many hours of testing, but so 'tis.