On 05/02/2013 05:39 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" <[email protected]> > > Since the 'nparams' variable passed to virTypedParametersFree is > supposed to represent the size of the 'params' array, it is bad > practice to initialize it to a non-zero value, until the array > has been allocated.
Thankfully, virTypedParamsFree() does nothing when passed a NULL params pointer, regardless of the size of nparams, so we had no real bug here; but I agree that it is wiser to be robust against any future changes in the code. > > Signed-off-by: Daniel P. Berrange <[email protected]> > --- > daemon/remote.c | 78 > ++++++++++++++++++++++++++++++++------------------------- > 1 file changed, 44 insertions(+), 34 deletions(-) ACK. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
