Merge pull request #2812 from citusdata/fix_memory_issues

Fix a use after free in adaptive executor
pull/2816/head
Marco Slot 2019-07-03 10:43:29 +02:00 committed by GitHub
commit 3359a7e6f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -1171,16 +1171,15 @@ CleanUpSessions(DistributedExecution *execution)
elog(WARNING, "unexpected transaction state at the end of execution: %d", elog(WARNING, "unexpected transaction state at the end of execution: %d",
transactionState); transactionState);
} }
/* get ready for the next executions if we need use the same connection */
connection->waitFlags = WL_SOCKET_READABLE | WL_SOCKET_WRITEABLE;
} }
else else
{ {
elog(WARNING, "unexpected connection state at the end of execution: %d", elog(WARNING, "unexpected connection state at the end of execution: %d",
connection->connectionState); connection->connectionState);
} }
/* get ready for the next executions if we need use the same connection */
connection->waitFlags = WL_SOCKET_READABLE | WL_SOCKET_WRITEABLE;
execution->waitFlagsChanged = true;
} }
} }