mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
cmd_sign/rwsig: Free sign_option.prikey in the main function
It's better to free it in the same function as it was allocated. BRANCH=none BUG=none TEST=make runtests Change-Id: I7a224364c4b1afce5a274b944d32fc1b7ba5db30 Reviewed-on: https://chromium-review.googlesource.com/446177 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
b1b5cf7ee8
commit
dec50797af
@@ -1051,6 +1051,8 @@ done:
|
||||
free(sign_option.keyblock);
|
||||
if (sign_option.kernel_subkey)
|
||||
free(sign_option.kernel_subkey);
|
||||
if (sign_option.prikey)
|
||||
vb2_private_key_free(sign_option.prikey);
|
||||
|
||||
if (errorcnt)
|
||||
fprintf(stderr, "Use --help for usage instructions\n");
|
||||
|
||||
@@ -212,8 +212,6 @@ int ft_sign_rwsig(const char *name, uint8_t *buf, uint32_t len, void *data)
|
||||
done:
|
||||
if (sig)
|
||||
free(sig);
|
||||
if (sign_option.prikey)
|
||||
vb2_private_key_free(sign_option.prikey);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user