[PATCH 12/12] test-util-sockets: Fix a memleak in test_socket_unix_abstract_good

Pan Nengyuan posted 12 patches 5 years, 5 months ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Max Reitz <mreitz@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Pierre Morel <pmorel@linux.ibm.com>, Eduardo Habkost <ehabkost@redhat.com>, Hailiang Zhang <zhang.zhanghailiang@huawei.com>, Thomas Huth <thuth@redhat.com>, Tony Krowiak <akrowiak@linux.ibm.com>, Kevin Wolf <kwolf@redhat.com>, Viktor Prutyanov <viktor.prutyanov@phystech.edu>, Markus Armbruster <armbru@redhat.com>, Richard Henderson <rth@twiddle.net>, Alex Williamson <alex.williamson@redhat.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Michael Roth <mdroth@linux.vnet.ibm.com>, Paolo Bonzini <pbonzini@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Juan Quintela <quintela@redhat.com>
There is a newer version of this series
[PATCH 12/12] test-util-sockets: Fix a memleak in test_socket_unix_abstract_good
Posted by Pan Nengyuan 5 years, 5 months ago
Fix a memleak in test_socket_unix_abstract_good().

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
---
 tests/test-util-sockets.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c
index 261dc48c03..5c4204a130 100644
--- a/tests/test-util-sockets.c
+++ b/tests/test-util-sockets.c
@@ -312,6 +312,7 @@ static void test_socket_unix_abstract_good(void)
     g_thread_join(cli);
     g_thread_join(serv);
 
+    g_rand_free(r);
     g_free(abstract_sock_name);
 }
 #endif
-- 
2.18.2


Re: [PATCH 12/12] test-util-sockets: Fix a memleak in test_socket_unix_abstract_good
Posted by Li Qiang 5 years, 5 months ago
Pan Nengyuan <pannengyuan@huawei.com> 于2020年8月14日周五 下午6:18写道:
>
> Fix a memleak in test_socket_unix_abstract_good().
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> ---

Hi Nengyuan,
I have sent this two month ago:
-->https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00809.html

seems the maintainer forget to push it to upstream.

Thanks,
Li Qiang


>  tests/test-util-sockets.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c
> index 261dc48c03..5c4204a130 100644
> --- a/tests/test-util-sockets.c
> +++ b/tests/test-util-sockets.c
> @@ -312,6 +312,7 @@ static void test_socket_unix_abstract_good(void)
>      g_thread_join(cli);
>      g_thread_join(serv);
>
> +    g_rand_free(r);
>      g_free(abstract_sock_name);
>  }
>  #endif
> --
> 2.18.2
>
>

Re: [PATCH 12/12] test-util-sockets: Fix a memleak in test_socket_unix_abstract_good
Posted by Pan Nengyuan 5 years, 5 months ago

On 2020/8/14 22:50, Li Qiang wrote:
> Pan Nengyuan <pannengyuan@huawei.com> 于2020年8月14日周五 下午6:18写道:
>>
>> Fix a memleak in test_socket_unix_abstract_good().
>>
>> Reported-by: Euler Robot <euler.robot@huawei.com>
>> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
>> ---
> 
> Hi Nengyuan,
> I have sent this two month ago:
> -->https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00809.html
> 
> seems the maintainer forget to push it to upstream.

Yes, it's the same. Let's ignore this one.

Thanks.

> 
> Thanks,
> Li Qiang
> 
> 
>>  tests/test-util-sockets.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c
>> index 261dc48c03..5c4204a130 100644
>> --- a/tests/test-util-sockets.c
>> +++ b/tests/test-util-sockets.c
>> @@ -312,6 +312,7 @@ static void test_socket_unix_abstract_good(void)
>>      g_thread_join(cli);
>>      g_thread_join(serv);
>>
>> +    g_rand_free(r);
>>      g_free(abstract_sock_name);
>>  }
>>  #endif
>> --
>> 2.18.2
>>
>>