Skip to content

Commit f3d8627

Browse files
authored
Merge pull request #281 from grooverdan/caching_sha2_pw_err
caching_sha2_pw: free filebuffer and cleanup on Public key import failure
2 parents 96b73e2 + 6fde019 commit f3d8627

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/auth/caching_sha2_pw.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ static int auth_caching_sha2_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
362362

363363
#endif
364364
if (!pubkey)
365-
return CR_ERROR;
365+
{
366+
rc= CR_ERROR;
367+
goto error;
368+
}
366369

367370
pwlen= (unsigned int)strlen(mysql->passwd) + 1; /* include terminating zero */
368371
if (pwlen > MAX_PW_LEN)

0 commit comments

Comments
 (0)