dict: fix memory leak in OOM exit path

Bug: https://github.com/bagder/curl/pull/90