Re: [PATCH] libxl: fix coverity issues introduced by 6a95edf

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

 




On 02/16/2017 11:43 AM, Joao Martins wrote:
> As discussed here [0][1] Coverity reported two issues:
> 
> - On libxlDomainMigrationPrepareTunnel3 @@mig will be leaked on failures
> after sucessfull call libxlDomainMigrationPrepareAny hence we free it.
> 
> Setting mig = NULL after @mig is assigned plus adding libxlMigrationCookieFree
> on error paths addresses the issue. In case virThreadCreate fails,
> unref of args frees the cookie on dispose function (libxlMigrationDstArgsDispose)
> 
> - On libxlMigrationStartTunnel @tc would be leaked.
> 
> Fixed by correctly saving the newly allocated @tc onto @tnl such that
> libxlMigrationStopTunnel would free it up.
> 
> [0] https://www.redhat.com/archives/libvir-list/2017-February/msg00791.html
> [1] https://www.redhat.com/archives/libvir-list/2017-February/msg00833.html
> 
> Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx>
> ---
> Cc: John Ferlan <jferlan@xxxxxxxxxx>
> Cc: Jim Fehlig <jfehlig@xxxxxxxx>
> ---
>  src/libxl/libxl_migration.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 

ACK and pushed.

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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