[ovs-dev] [PATCH] test-stream: Silence memory leak report.

Paolo Valerio pvalerio at redhat.com
Fri Dec 18 19:19:51 UTC 2020


Ilya Maximets <i.maximets at ovn.org> writes:

> AddressSanitizer reports this as a leak.
> Let's just free the memory before exiting to avoid the noise.
>
> 'stream_close()' doesn't update the pointer, so this will not
> change the return value.
>
> Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
> ---
>  tests/test-stream.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/test-stream.c b/tests/test-stream.c
> index 4af44200e..68ce2c544 100644
> --- a/tests/test-stream.c
> +++ b/tests/test-stream.c
> @@ -42,5 +42,6 @@ main(int argc, char *argv[])
>          VLOG_ERR("stream_open_block(%s) failure: %s",
>                   argv[1], ovs_strerror(error));
>      }
> +    stream_close(stream);
>      return (error || !stream) ? 1 : 0;
>  }
> -- 

Acked-by: Paolo Valerio <pvalerio at redhat.com>



More information about the dev mailing list