diff options
author | Tom Rini <trini@konsulko.com> | 2020-01-21 11:53:38 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-01-30 13:30:35 -0500 |
commit | 5749faa3d6837d6dbaf2119fc3ec49a326690c8f (patch) | |
tree | d92ce80d2c27e3ded3a7a75133715602cbbbabb1 /common/console.c | |
parent | e7ab1cb3f0421ad8e8435a8258790e238c623ea2 (diff) |
cmd/gpt: Address error cases during gpt rename more correctly
New analysis by the tool has shown that we have some cases where we
weren't handling the error exit condition correctly. When we ran into
the ENOMEM case we wouldn't exit the function and thus incorrect things
could happen. Rework the unwinding such that we don't need a helper
function now and free what we may have allocated.
Fixes: 18030d04d25d ("GPT: fix memory leaks identified by Coverity")
Reported-by: Coverity (CID: 275475, 275476)
Cc: Alison Chaiken <alison@she-devel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Jordy <jordy@simplyhacker.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Diffstat (limited to 'common/console.c')
0 files changed, 0 insertions, 0 deletions