switch back to old memory context in cache local plan for task (#3428)

pull/3427/head^2
SaitTalhaNisanci 2020-01-27 13:00:46 +03:00 committed by GitHub
parent ca85b2b4ff
commit 94bd563ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -433,6 +433,7 @@ CacheLocalPlanForTask(Task *task, DistributedPlan *originalDistributedPlan)
if (rangeTableEntry->relid == InvalidOid)
{
pfree(shardQuery);
MemoryContextSwitchTo(oldContext);
return;
}