Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4f87f76

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 d1a9f12 commit 4f87f76

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
@@ -1384,8 +1384,7 @@ PQsendQueryStart(PGconn *conn)
13841384
}
13851385

13861386
/* initialize async result-accumulation state */
1387-
conn->result = NULL;
1388-
conn->next_result = NULL;
1387+
pqClearAsyncResult(conn);
13891388

13901389
/* reset single-row processing mode */
13911390
conn->singleRowMode = false;

0 commit comments

Comments
 (0)