Fix segfault whilst freeing urls

This fixes https://github.com/Yubico/yubico-pam/issues/37 and maybe https://github.com/Yubico/yubico-pam/issues/31 too?