mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Remove unnecessary goto from cipher kernel wrapper.
This commit is contained in:
@@ -164,15 +164,14 @@ static int _crypt_cipher_crypt(struct crypt_cipher_kernel *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = sendmsg(ctx->opfd, &msg, 0);
|
len = sendmsg(ctx->opfd, &msg, 0);
|
||||||
if (len != (ssize_t)(in_length)) {
|
if (len != (ssize_t)(in_length))
|
||||||
r = -EIO;
|
r = -EIO;
|
||||||
goto bad;
|
else {
|
||||||
|
len = read(ctx->opfd, out, out_length);
|
||||||
|
if (len != (ssize_t)out_length)
|
||||||
|
r = -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = read(ctx->opfd, out, out_length);
|
|
||||||
if (len != (ssize_t)out_length)
|
|
||||||
r = -EIO;
|
|
||||||
bad:
|
|
||||||
crypt_backend_memzero(buffer, sizeof(buffer));
|
crypt_backend_memzero(buffer, sizeof(buffer));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user