diff options
-rw-r--r-- | crypto/scompress.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/scompress.c b/crypto/scompress.c index 0b40d991d65f..2c07648305ad 100644 --- a/crypto/scompress.c +++ b/crypto/scompress.c | |||
@@ -125,8 +125,11 @@ static int crypto_scomp_alloc_all_scratches(void) | |||
125 | if (!scomp_src_scratches) | 125 | if (!scomp_src_scratches) |
126 | return -ENOMEM; | 126 | return -ENOMEM; |
127 | scomp_dst_scratches = crypto_scomp_alloc_scratches(); | 127 | scomp_dst_scratches = crypto_scomp_alloc_scratches(); |
128 | if (!scomp_dst_scratches) | 128 | if (!scomp_dst_scratches) { |
129 | crypto_scomp_free_scratches(scomp_src_scratches); | ||
130 | scomp_src_scratches = NULL; | ||
129 | return -ENOMEM; | 131 | return -ENOMEM; |
132 | } | ||
130 | } | 133 | } |
131 | return 0; | 134 | return 0; |
132 | } | 135 | } |