[libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

Jim Meyering jim at meyering.net
Thu Apr 15 05:38:21 UTC 2010

Matthias Bolte wrote:
>>> >      for (i = 0; i < nruleInstances; i++)
>>> > +        sa_assert (inst);
>> Due to this statement here I get segmentation faults for which there is no
>> reason. I have no idea why that is but I have to deactivate this line for it
>> to work again.
>> The same is not true for the statement further above...  So strange.
>>    Stefan
> This one is obvious. The second for loop has no {} abound it's block.
> Before the addition of sa_assert the switch formed the block of the
> for loop and everything works as expected. Now the sa_assert line is
> block of the for loop and the switch is no longer inside the loop.
> Adding proper {} to the second for loop will fix the problem.


More information about the libvir-list mailing list