pull: Fix use-after-free

The strchr() was pointing into a string we were freeing.