[libvirt] [PATCH] Fix leak on OOM when creating nwfilter rule instances
Michal Privoznik
mprivozn at redhat.com
Mon Mar 17 12:42:20 UTC 2014
On 17.03.2014 12:59, Daniel P. Berrange wrote:
> The ebiptablesAddRuleInst method would leak an instance
> of ebiptablesRuleInstPtr if it hit OOM when adding it
> to the list of instances. Remove the pointless helper
> method virNWFilterRuleInstAddData and just inline the
> call to VIR_APPEND_ELEMENT and free the instance on
> failure.
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/nwfilter/nwfilter_ebiptables_driver.c | 6 +++++-
> src/nwfilter/nwfilter_gentech_driver.c | 22 ----------------------
> src/nwfilter/nwfilter_gentech_driver.h | 3 ---
> 3 files changed, 5 insertions(+), 26 deletions(-)
>
ACK
Michal
More information about the libvir-list
mailing list