Re: [PATCH 4/4] virSecretLoad: Simplify cleanup path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  src/conf/virsecretobj.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux