diff options
Diffstat (limited to 'contrib/pgcrypto/px.c')
-rw-r--r-- | contrib/pgcrypto/px.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/pgcrypto/px.c b/contrib/pgcrypto/px.c index f23d4de5738..4b2a1207f9d 100644 --- a/contrib/pgcrypto/px.c +++ b/contrib/pgcrypto/px.c @@ -104,6 +104,12 @@ px_strerror(int err) return "Bad error code"; } +/* memset that must not be optimized away */ +void +px_memset(void *ptr, int c, size_t len) +{ + memset(ptr, c, len); +} const char * px_resolve_alias(const PX_Alias *list, const char *name) @@ -327,7 +333,7 @@ combo_free(PX_Combo *cx) { if (cx->cipher) px_cipher_free(cx->cipher); - memset(cx, 0, sizeof(*cx)); + px_memset(cx, 0, sizeof(*cx)); px_free(cx); } |