diff --git a/crypto/akcipher.c b/crypto/akcipher.c
index e9b6ddcdf1244a9d308961fa1ae1c6650c587267..52813f0b19e4e915bf7c53e178e97833caee72f0 100644
--- a/crypto/akcipher.c
+++ b/crypto/akcipher.c
@@ -234,7 +234,8 @@ EXPORT_SYMBOL_GPL(crypto_akcipher_sync_prep);
 int crypto_akcipher_sync_post(struct crypto_akcipher_sync_data *data, int err)
 {
 	err = crypto_wait_req(err, &data->cwait);
-	memcpy(data->dst, data->buf, data->dlen);
+	if (data->dst)
+		memcpy(data->dst, data->buf, data->dlen);
 	data->dlen = data->req->dst_len;
 	kfree_sensitive(data->req);
 	return err;