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

Re: [libvirt] [PATCH] virNetSocketNewConnectUNIX: Don't unlink(NULL)




On 04/16/2015 10:28 AM, Michal Privoznik wrote:
> There is a possibility that we jump onto error label with @lockpath
> still initialized to NULL. Here, the @lockpath should be unlink()-ed,
> but passing there a NULL is not a good idea. Don't do that. In fact,
> we should call unlink() only if we created the lock file successfully.
> 
> Reported-by: John Ferlan <jferlan redhat com>
> Signed-off-by: Michal Privoznik <mprivozn redhat com>
> ---
>  src/rpc/virnetsocket.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
ACK  (Coverity is happy too)

John


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