forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitca2a12c
committed
Fix potential memory leak in pgcrypto
When allocating a EVP context, it would have been possible to leak somememory allocated directly by OpenSSL, that PostgreSQL lost track of ifthe initialization of the context allocated failed. The cleanup can bedone with EVP_MD_CTX_destroy().Note that EVP APIs exist since OpenSSL 0.9.7 and we have in the treeequivalent implementations for older versions sincece9b75d (coderemoved with9b7cd59 as of 10~). However, in 9.5 and 9.6, the existingcode makes use of EVP_MD_CTX_destroy() and EVP_MD_CTX_create() withoutan equivalent implementation when building the tree with OpenSSL 0.9.6or older, meaning that this code is in reality broken with such versionssince it got introduced ine2838c5. As we have heard no complains aboutthat, it does not seem worth bothering with in 9.5 and 9.6, so I haveleft that out for simplicity.Author: Michael PaquierDiscussion:https://postgr.es/m/20201015072212.GC2305@paquier.xyzBackpatch-through: 9.51 parenta90c950 commitca2a12c
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
202 | 202 |
| |
203 | 203 |
| |
204 | 204 |
| |
| 205 | + | |
205 | 206 |
| |
206 | 207 |
| |
207 | 208 |
| |
|
0 commit comments
Comments
(0)