Unverified Commit 757f2884 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10780 crypto: hisilicon/sec - Fix memory leak for sec resource release

parents 9953af1b 63e8dd8d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -479,8 +479,10 @@ static void sec_alg_resource_free(struct sec_ctx *ctx,

	if (ctx->pbuf_supported)
		sec_free_pbuf_resource(dev, qp_ctx->res);
	if (ctx->alg_type == SEC_AEAD)
	if (ctx->alg_type == SEC_AEAD) {
		sec_free_mac_resource(dev, qp_ctx->res);
		sec_free_aiv_resource(dev, qp_ctx->res);
	}
}

static int sec_alloc_qp_ctx_resource(struct hisi_qm *qm, struct sec_ctx *ctx,