diff mbox series

tests: test-bdrv-graph-mod: fix memory leak

Message ID 20190310113408.59912-1-liq3ea@163.com (mailing list archive)
State New, archived
Headers show
Series tests: test-bdrv-graph-mod: fix memory leak | expand

Commit Message

Li Qiang March 10, 2019, 11:34 a.m. UTC
Fixes: 2dbfadf
Spotted by ASAN when 'make check'.

Signed-off-by: Li Qiang <liq3ea@163.com>
---
 tests/test-bdrv-graph-mod.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Philippe Mathieu-Daudé March 10, 2019, 2:34 p.m. UTC | #1
On 3/10/19 12:34 PM, Li Qiang wrote:
> Fixes: 2dbfadf

  ^ Please keep tags together (with Signed-off-by, ...)

> Spotted by ASAN when 'make check'.

I'm not native English speaker but I'd say:

Spotted by ASAN [with] 'make check'.

or

Spotted by ASAN [while running] 'make check'.

Here goes:

"Fixes: 2dbfadf"

> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
>  tests/test-bdrv-graph-mod.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/test-bdrv-graph-mod.c b/tests/test-bdrv-graph-mod.c
> index 458dfa6661..8bf0fe735d 100644
> --- a/tests/test-bdrv-graph-mod.c
> +++ b/tests/test-bdrv-graph-mod.c
> @@ -117,6 +117,7 @@ static void test_update_perm_tree(void)
>  
>      bdrv_unref(bs);
>      blk_unref(root);
> +    error_free(local_err);

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

>  }
>  
>  /*
>
Vladimir Sementsov-Ogievskiy March 11, 2019, 7:55 a.m. UTC | #2
10.03.2019 14:34, Li Qiang wrote:
> Fixes: 2dbfadf
> Spotted by ASAN when 'make check'.
> 
> Signed-off-by: Li Qiang <liq3ea@163.com>

Oops, my fault, thank you for fixing this!

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

> ---
>   tests/test-bdrv-graph-mod.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/test-bdrv-graph-mod.c b/tests/test-bdrv-graph-mod.c
> index 458dfa6661..8bf0fe735d 100644
> --- a/tests/test-bdrv-graph-mod.c
> +++ b/tests/test-bdrv-graph-mod.c
> @@ -117,6 +117,7 @@ static void test_update_perm_tree(void)
>   
>       bdrv_unref(bs);
>       blk_unref(root);
> +    error_free(local_err);
>   }
>   
>   /*
>
Li Qiang March 12, 2019, 12:31 a.m. UTC | #3
Philippe Mathieu-Daudé <philmd@redhat.com> 于2019年3月10日周日 下午10:34写道:

> On 3/10/19 12:34 PM, Li Qiang wrote:
> > Fixes: 2dbfadf
>
>   ^ Please keep tags together (with Signed-off-by, ...)
>
> > Spotted by ASAN when 'make check'.
>
> I'm not native English speaker but I'd say:
>
>

Thanks your advice.
Hope the maintainer will do this minor adjustment.

Thanks,
Li Qiang




> Spotted by ASAN [with] 'make check'.
>
> or
>
> Spotted by ASAN [while running] 'make check'.
>
> Here goes:
>
> "Fixes: 2dbfadf"
>
> > Signed-off-by: Li Qiang <liq3ea@163.com>
> > ---
> >  tests/test-bdrv-graph-mod.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/tests/test-bdrv-graph-mod.c b/tests/test-bdrv-graph-mod.c
> > index 458dfa6661..8bf0fe735d 100644
> > --- a/tests/test-bdrv-graph-mod.c
> > +++ b/tests/test-bdrv-graph-mod.c
> > @@ -117,6 +117,7 @@ static void test_update_perm_tree(void)
> >
> >      bdrv_unref(bs);
> >      blk_unref(root);
> > +    error_free(local_err);
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> >  }
> >
> >  /*
> >
>
diff mbox series

Patch

diff --git a/tests/test-bdrv-graph-mod.c b/tests/test-bdrv-graph-mod.c
index 458dfa6661..8bf0fe735d 100644
--- a/tests/test-bdrv-graph-mod.c
+++ b/tests/test-bdrv-graph-mod.c
@@ -117,6 +117,7 @@  static void test_update_perm_tree(void)
 
     bdrv_unref(bs);
     blk_unref(root);
+    error_free(local_err);
 }
 
 /*