From f977a653e02735e9473dbdfc8496720d7b46433b Mon Sep 17 00:00:00 2001 From: Andriy Kohut Date: Thu, 19 Jul 2018 12:08:57 +0000 Subject: [PATCH] pmc_common: Recycle message if allocation of tlv_extra failed Change-Id: I4ed12f1cddcb85e8f55552ce8980a9d5f3f7d800 Signed-off-by: Andriy Kohut --- pmc_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pmc_common.c b/pmc_common.c index 0246fea..4a160f6 100644 --- a/pmc_common.c +++ b/pmc_common.c @@ -506,6 +506,7 @@ int pmc_send_get_action(struct pmc *pmc, int id) extra = tlv_extra_alloc(); if (!extra) { pr_err("failed to allocate TLV descriptor"); + msg_put(msg); return -ENOMEM; } extra->tlv = (struct TLV *) msg->management.suffix;