forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbb9237a
committed
Add missing bad-PGconn guards in libpq entry points.
There's a convention that externally-visible libpq functions shouldcheck for a NULL PGconn pointer, and fail gracefully instead ofcrashing. PQflush() and PQisnonblocking() didn't get that memothough. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL;while it's not clear that ordinary usage could reach that with anull conn pointer, it's cheap enough to check, so let's be consistent.Daniele Varrazzo and Tom LaneDiscussion:https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com1 parent1c5818b commitbb9237a
2 files changed
+5
-1
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3917 | 3917 |
| |
3918 | 3918 |
| |
3919 | 3919 |
| |
| 3920 | + | |
| 3921 | + | |
3920 | 3922 |
| |
3921 | 3923 |
| |
3922 | 3924 |
| |
| |||
3936 | 3938 |
| |
3937 | 3939 |
| |
3938 | 3940 |
| |
| 3941 | + | |
| 3942 | + | |
3939 | 3943 |
| |
3940 | 3944 |
| |
3941 | 3945 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1938 | 1938 |
| |
1939 | 1939 |
| |
1940 | 1940 |
| |
1941 |
| - | |
| 1941 | + | |
1942 | 1942 |
| |
1943 | 1943 |
| |
1944 | 1944 |
| |
|
0 commit comments
Comments
(0)