gfphoenix78 commented on code in PR #1424:
URL: https://github.com/apache/cloudberry/pull/1424#discussion_r2509167290
##########
src/backend/crypto/bufenc.c:
##########
@@ -51,12 +51,9 @@ InitializeBufferEncryption(void)
if (CheckIsSM4Method())
{
- bool found;
- BufEncCtx = ShmemInitStruct("sm4 encryption method encrypt ctx",
-
sizeof(sm4_ctx), &found);
+ BufEncCtx = malloc(sizeof(sm4_ctx));
Review Comment:
The following `BufEncCtx = (void *)pg_cipher_ctx_create(...` may also
allocate the memory block twice if the postmaster resets the cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]