pmc_common: Recycle message if allocation of tlv_extra failed

Change-Id: I4ed12f1cddcb85e8f55552ce8980a9d5f3f7d800
Signed-off-by: Andriy Kohut <andriyk@mellanox.com>
master
Andriy Kohut 2018-07-19 12:08:57 +00:00 committed by Richard Cochran
parent f32553b70a
commit f977a653e0
1 changed files with 1 additions and 0 deletions

View File

@ -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;