cifsd: move ret check before the out label
authorNamjae Jeon <namjae.jeon@samsung.com>
Wed, 26 May 2021 06:27:11 +0000 (15:27 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Wed, 26 May 2021 09:12:04 +0000 (18:12 +0900)
Move ret check before the out label.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifsd/auth.c

index ab69809..092db15 100644 (file)
@@ -311,9 +311,9 @@ static int calc_ntlmv2_hash(struct ksmbd_session *sess, char *ntlmv2_hash,
        }
 
        ret = crypto_shash_final(CRYPTO_HMACMD5(ctx), ntlmv2_hash);
-out:
        if (ret)
                ksmbd_debug(AUTH, "Could not generate md5 hash\n");
+out:
        kfree(uniname);
        kfree(domain);
        ksmbd_release_crypto_ctx(ctx);