Fix memleak caused by the fact that url_open_buf() allocates a context