aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/af_alg.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/af_alg.c')
-rw-r--r--crypto/af_alg.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 85cea9de324a..1e5353f62067 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -672,14 +672,15 @@ void af_alg_free_areq_sgls(struct af_alg_async_req *areq)
672 } 672 }
673 673
674 tsgl = areq->tsgl; 674 tsgl = areq->tsgl;
675 for_each_sg(tsgl, sg, areq->tsgl_entries, i) { 675 if (tsgl) {
676 if (!sg_page(sg)) 676 for_each_sg(tsgl, sg, areq->tsgl_entries, i) {
677 continue; 677 if (!sg_page(sg))
678 put_page(sg_page(sg)); 678 continue;
679 } 679 put_page(sg_page(sg));
680 }
680 681
681 if (areq->tsgl && areq->tsgl_entries)
682 sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl)); 682 sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl));
683 }
683} 684}
684EXPORT_SYMBOL_GPL(af_alg_free_areq_sgls); 685EXPORT_SYMBOL_GPL(af_alg_free_areq_sgls);
685 686