Skip to content

Commit b6a59ce

Browse files
committed
Free RSA public key in mysqlnd sha256 auth
Not sure why this only started showing up as a leak now.
1 parent 3280209 commit b6a59ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/mysqlnd/mysqlnd_auth.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
810810
*auth_data_len = server_public_key_len;
811811
ret = malloc(*auth_data_len);
812812
RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, ret, server_public_key, RSA_PKCS1_OAEP_PADDING);
813+
RSA_free(server_public_key);
813814
}
814815
}
815816

0 commit comments

Comments
 (0)