fix invalid free mentioned in bug 68665

thanks honey at internot dot info