[PATCH] network: Remove memory leak caused by wrong initialization

Michal Privoznik mprivozn at redhat.com
Mon Apr 27 07:56:47 UTC 2020


On 4/25/20 6:35 PM, Julio Faracco wrote:
> This commit fix a wrong variable initialization. There is a variable
> called `new_lease` which is being initialized with the content of
> parameter `lease`. To avoid memory leak, the proper way is initialize
> with NULL first. This wrong statement was added by commit 97a0aa24.
> There are some other improvements also.
> 
> Signed-off-by: Julio Faracco <jcfaracco at gmail.com>
> ---
>   src/conf/network_conf.c     | 38 ++++++++++++++++++-------------------
>   src/network/bridge_driver.c |  8 ++------
>   2 files changed, 21 insertions(+), 25 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

and pushed.

Michal




More information about the libvir-list mailing list