Skip to content
Snippets Groups Projects
Commit 5749faa3 authored by Tom Rini's avatar Tom Rini
Browse files

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: 18030d04 ("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: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
parent e7ab1cb3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment