Content-Length: 259943 | pFad | http://github.com/postgrespro/postgres/commit/886f6c5ccdb500eeeec7e0abdf1500e20a304c45

E1 In PQsendQueryStart(), avoid leaking any left-over async result. · postgrespro/postgres@886f6c5 · GitHub
Skip to content

Commit 886f6c5

Browse files
committed
In PQsendQueryStart(), avoid leaking any left-over async result.
Ordinarily there would not be an async result sitting around at this point, but it appears that in corner cases there can be. Considering all the work we're about to launch, it's hardly going to cost anything noticeable to check. It's been like this forever, so back-patch to all supported branches. Report: <CAD-Qf1eLUtBOTPXyFQGW-4eEsop31tVVdZPu4kL9pbQ6tJPO8g@mail.gmail.com>
1 parent 6fb12cb commit 886f6c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/interfaces/libpq/fe-exec.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,8 +1386,7 @@ PQsendQueryStart(PGconn *conn)
13861386
}
13871387

13881388
/* initialize async result-accumulation state */
1389-
conn->result = NULL;
1390-
conn->next_result = NULL;
1389+
pqClearAsyncResult(conn);
13911390

13921391
/* reset single-row processing mode */
13931392
conn->singleRowMode = false;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/886f6c5ccdb500eeeec7e0abdf1500e20a304c45

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy