On 07/15/2014 02:38 PM, Michal Privoznik wrote:
> There are just two places where we rely on the fact that VIR_FREE()
> macro is without any side effects. In the future, this property of the
> macro is going to change, so we need the code to be adjusted to deal
> with argument passed to VIR_FREE() being evaluated multiple times.
> 
> Signed-off-by: Michal Privoznik <[email protected]>
> ---
>  src/conf/network_conf.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)

NACK, this completely removes the side effect. You need to adjust the callers
for that.

IMO we should set n<elems> to 0 in all *Clear functions, not just
virNetworkDNSHostDefClear, after which NULL might be dereferenced based on the
n<elems> variable.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to