[PATCH 4/4] virSecretLoad: Simplify cleanup path
Peter Krempa
pkrempa at redhat.com
Mon Oct 16 13:15:58 UTC 2023
On Mon, Oct 16, 2023 at 10:07:51 +0200, Michal Privoznik wrote:
> When loading a secret value fails, the control jumps over to the
> 'cleanup' label where explicit call to virSecretDefFree()
> happens. This is unnecessary as the corresponding variable can be
> declared with g_autoptr() after which all error paths can just
> return NULL instantly.
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> src/conf/virsecretobj.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
Reviewed-by: Peter Krempa <pkrempa at redhat.com>
More information about the libvir-list
mailing list