diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2018-10-25 03:15:58 -0500 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-10-25 23:53:18 -0500 |
commit | b6de35b6896a7d21a72be79e720eeae2dc620fa2 (patch) | |
tree | 316de631ee213bbeff2c48b99a9dcf999a09df49 /libflash/ipmi-hiomap.c | |
parent | 4b8cc05a94513816d43fb8bd6178896b430af08f (diff) | |
download | skiboot-b6de35b6896a7d21a72be79e720eeae2dc620fa2.zip skiboot-b6de35b6896a7d21a72be79e720eeae2dc620fa2.tar.gz skiboot-b6de35b6896a7d21a72be79e720eeae2dc620fa2.tar.bz2 |
hiomap: free ipmi message in callback
Otherwise we'd slowly leak memory on each hiomap operation.
Fixes: 529bdca0bc546a7ae3ecbd2c3134b7260072d8b0
Tested-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'libflash/ipmi-hiomap.c')
-rw-r--r-- | libflash/ipmi-hiomap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libflash/ipmi-hiomap.c b/libflash/ipmi-hiomap.c index d36c5f1..5300dae 100644 --- a/libflash/ipmi-hiomap.c +++ b/libflash/ipmi-hiomap.c @@ -117,6 +117,7 @@ static void ipmi_hiomap_cmd_cb(struct ipmi_msg *msg) if (msg->resp_size < 2) { prerror("Illegal response size: %u\n", msg->resp_size); res->cc = IPMI_ERR_UNSPECIFIED; + ipmi_free_msg(msg); return; } @@ -124,6 +125,7 @@ static void ipmi_hiomap_cmd_cb(struct ipmi_msg *msg) prerror("Unmatched sequence number: wanted %u got %u\n", ctx->seq, msg->data[1]); res->cc = IPMI_ERR_UNSPECIFIED; + ipmi_free_msg(msg); return; } @@ -210,6 +212,7 @@ static void ipmi_hiomap_cmd_cb(struct ipmi_msg *msg) msg->data[0]); break; }; + ipmi_free_msg(msg); } static bool hiomap_get_info(struct ipmi_hiomap *ctx) |