SOLR-2793: Be sure to only dec ref if we inc ref'd

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1175646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2011-09-26 02:13:23 +00:00
parent 50b31b2a4e
commit 67fe9a6b81
1 changed files with 1 additions and 1 deletions

View File

@ -1268,7 +1268,7 @@ public final class SolrCore implements SolrInfoMBean {
);
} catch(Exception e) {
// if submit fails, newSearchHolder does not get decref'd
if (newSearchHolder != null) newSearchHolder.decref();
if (returnSearcher && newSearchHolder != null) newSearchHolder.decref();
throw e;
}
}