url.c: Fixed memory leak on OOM

This showed itself on some systems with torture failures
in tests 1060 and 1061