given this I think we should add some checks to the place where this is created in `SearchService`
ie. this:
```Java
 SearchContext createAndPutContext(ShardSearchRequest request) throws ElasticsearchException {
        SearchContext context = createContext(request);
        activeContexts.put(context.id(), context);
        context.indexShard().searchService().onNewContext(context);
        return context;
    }
```

should look like:
```Java
 SearchContext createAndPutContext(ShardSearchRequest request) throws ElasticsearchException {
        SearchContext context = createContext(request);
        boolean success = false;
        try {
            activeContexts.put(context.id(), context);
            context.indexShard().searchService().onNewContext(context);
            success = true;
            return context;
        } finally {
              if (!success) { 
                 freeContext(context);
              }
        }
    }
```