If strdup failed, don't try and free the wrong thing.