aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/af_alg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 7846c0c20cfe..b52a14fc3bae 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -1156,8 +1156,10 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
1156 1156
1157 /* make one iovec available as scatterlist */ 1157 /* make one iovec available as scatterlist */
1158 err = af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, seglen); 1158 err = af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, seglen);
1159 if (err < 0) 1159 if (err < 0) {
1160 rsgl->sg_num_bytes = 0;
1160 return err; 1161 return err;
1162 }
1161 1163
1162 /* chain the new scatterlist with previous one */ 1164 /* chain the new scatterlist with previous one */
1163 if (areq->last_rsgl) 1165 if (areq->last_rsgl)