mirror of https://github.com/citusdata/citus.git
fix single tuple result memory leak (#6724)
We should not omit to free PGResult when we receive single tuple result
from an internal backend.
Single tuple results are normally freed by our ReceiveResults for
`tupleDescriptor != NULL` flow but not for those with `tupleDescriptor
== NULL`. See PR #6722 for details.
DESCRIPTION: Fixes memory leak issue with query results that returns
single row.
(cherry picked from commit 9e69dd0e7f
)
release-11.2-jelte
parent
e7ac6fd0c1
commit
0626f366c1
|
@ -4777,6 +4777,7 @@ ReceiveResults(WorkerSession *session, bool storeRows)
|
||||||
TupleDesc tupleDescriptor = tupleDest->tupleDescForQuery(tupleDest, queryIndex);
|
TupleDesc tupleDescriptor = tupleDest->tupleDescForQuery(tupleDest, queryIndex);
|
||||||
if (tupleDescriptor == NULL)
|
if (tupleDescriptor == NULL)
|
||||||
{
|
{
|
||||||
|
PQclear(result);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue