forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite37e9a6
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 parentbcf7eb9 commite37e9a6
2 files changed
+5
-1
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3267 | 3267 |
| |
3268 | 3268 |
| |
3269 | 3269 |
| |
| 3270 | + | |
| 3271 | + | |
3270 | 3272 |
| |
3271 | 3273 |
| |
3272 | 3274 |
| |
| |||
3286 | 3288 |
| |
3287 | 3289 |
| |
3288 | 3290 |
| |
| 3291 | + | |
| 3292 | + | |
3289 | 3293 |
| |
3290 | 3294 |
| |
3291 | 3295 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1747 | 1747 |
| |
1748 | 1748 |
| |
1749 | 1749 |
| |
1750 |
| - | |
| 1750 | + | |
1751 | 1751 |
| |
1752 | 1752 |
| |
1753 | 1753 |
| |
|
0 commit comments
Comments
(0)