base fetch: fix two memory leaks, one severe and one potential