Re: [PATCH] util: Alter return value of virReadFCHost and fix mem leak

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

 



> >> VIR_FREE() would have to be done at the top of the function; otherwise,
> >> how does the caller distinguish which error occurred when -1 gets
> >> returned and whether it should VIR_FREE itself?
> >>
> > 
> > Well, I have to admin that this^^ is a fair argument because there are 3
> > different spots where the function can fail, not that the caller could not
> > check result for NULL but the fact that a function touched caller's argument
> > and then failed would be just weird. So, yeah, good point.
> > 
> I actually thought this was the "more compelling" reason, but seeing as
> there's no other feedback - I'll make the simple patch for having the
> VIR_FREE() in virReadFCHost, adjust the comments, and move on.
> 
> John
> 

Hi John, I think I admitted that you had a very good point (the one on top) so
I thought you would actually push your original version, I'm sorry if I wasn't
clear enough with my statement.

Erik

Attachment: signature.asc
Description: PGP signature

--
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]