mbox series

[v2,00/10] fix some error memleaks

Message ID 20200831134315.1221-1-pannengyuan@huawei.com
Headers show
Series fix some error memleaks | expand

Message

Pan Nengyuan Aug. 31, 2020, 1:43 p.m. UTC
This series fix some Error/GError memleaks.

V2: 
  1. remove two patches.(One has aleardy applied. The other has fixed.)
  2. change patch 5/10 and 7/10.

Pan Nengyuan (10):
  qga/channel-posix: Plug memory leak in ga_channel_write_all()
  elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init
  elf2dmp/pdb: Plug memleak in pdb_init_from_file
  target/i386/sev: Plug memleak in sev_read_file_base64
  ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()
  target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features
  migration/colo: Plug memleaks in colo_process_incoming_thread
  blockdev: Fix a memleak in drive_backup_prepare()
  block/file-posix: fix a possible undefined behavior
  vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string

 block/file-posix.c         |  2 +-
 blockdev.c                 |  1 +
 contrib/elf2dmp/pdb.c      |  1 +
 contrib/elf2dmp/qemu_elf.c |  1 +
 migration/colo.c           |  5 ++++-
 qga/channel-posix.c        |  6 +++++-
 target/i386/cpu.c          |  1 +
 target/i386/sev.c          |  1 +
 ui/gtk-gl-area.c           | 11 +++++++++++
 ui/vnc-auth-sasl.c         |  1 +
 10 files changed, 27 insertions(+), 3 deletions(-)

Comments

Gerd Hoffmann Aug. 31, 2020, 8:38 a.m. UTC | #1
On Mon, Aug 31, 2020 at 09:43:10AM -0400, Pan Nengyuan wrote:
> Receiving error in local variable err, and forgot to free it.
> This patch check the return value of 'gdk_window_create_gl_context'
> and 'gdk_gl_context_realize', then free err to fix it.
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> ---
> Cc: Gerd Hoffmann <kraxel@redhat.com>

Added to UI queue.

thanks,
  Gerd
Eduardo Habkost Sept. 2, 2020, 11:30 a.m. UTC | #2
On Mon, Aug 31, 2020 at 09:43:09AM -0400, Pan Nengyuan wrote:
> Missing g_error_free() in sev_read_file_base64() error path.
> Fix that.
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> Reviewed-by: Li Qiang <liq3ea@gmail.com>

Queued, thanks!
Pan Nengyuan Sept. 17, 2020, 12:49 p.m. UTC | #3
ping!

Anyone queued the rest(patch 01/02/03/07/08/09)?

On 2020/8/31 21:43, Pan Nengyuan wrote:
> This series fix some Error/GError memleaks.
> 
> V2: 
>   1. remove two patches.(One has aleardy applied. The other has fixed.)
>   2. change patch 5/10 and 7/10.
> 
> Pan Nengyuan (10):
>   qga/channel-posix: Plug memory leak in ga_channel_write_all()
>   elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init
>   elf2dmp/pdb: Plug memleak in pdb_init_from_file
>   target/i386/sev: Plug memleak in sev_read_file_base64
>   ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()
>   target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features
>   migration/colo: Plug memleaks in colo_process_incoming_thread
>   blockdev: Fix a memleak in drive_backup_prepare()
>   block/file-posix: fix a possible undefined behavior
>   vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string
> 
>  block/file-posix.c         |  2 +-
>  blockdev.c                 |  1 +
>  contrib/elf2dmp/pdb.c      |  1 +
>  contrib/elf2dmp/qemu_elf.c |  1 +
>  migration/colo.c           |  5 ++++-
>  qga/channel-posix.c        |  6 +++++-
>  target/i386/cpu.c          |  1 +
>  target/i386/sev.c          |  1 +
>  ui/gtk-gl-area.c           | 11 +++++++++++
>  ui/vnc-auth-sasl.c         |  1 +
>  10 files changed, 27 insertions(+), 3 deletions(-)
>
Pan Nengyuan Sept. 21, 2020, 2:12 a.m. UTC | #4
ping!

and cc: qemu-trivial@nongnu.org

On 2020/9/17 20:49, Pan Nengyuan wrote:
> ping!
> 
> Anyone queued the rest(patch 01/02/03/07/08/09)?
> 
> On 2020/8/31 21:43, Pan Nengyuan wrote:
>> This series fix some Error/GError memleaks.
>>
>> V2: 
>>   1. remove two patches.(One has aleardy applied. The other has fixed.)
>>   2. change patch 5/10 and 7/10.
>>
>> Pan Nengyuan (10):
>>   qga/channel-posix: Plug memory leak in ga_channel_write_all()
>>   elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init
>>   elf2dmp/pdb: Plug memleak in pdb_init_from_file
>>   target/i386/sev: Plug memleak in sev_read_file_base64
>>   ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()
>>   target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features
>>   migration/colo: Plug memleaks in colo_process_incoming_thread
>>   blockdev: Fix a memleak in drive_backup_prepare()
>>   block/file-posix: fix a possible undefined behavior
>>   vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string
>>
>>  block/file-posix.c         |  2 +-
>>  blockdev.c                 |  1 +
>>  contrib/elf2dmp/pdb.c      |  1 +
>>  contrib/elf2dmp/qemu_elf.c |  1 +
>>  migration/colo.c           |  5 ++++-
>>  qga/channel-posix.c        |  6 +++++-
>>  target/i386/cpu.c          |  1 +
>>  target/i386/sev.c          |  1 +
>>  ui/gtk-gl-area.c           | 11 +++++++++++
>>  ui/vnc-auth-sasl.c         |  1 +
>>  10 files changed, 27 insertions(+), 3 deletions(-)
>>
Pan Nengyuan Oct. 10, 2020, 11:05 a.m. UTC | #5
ping!

Hello,

Some patches have been reviewed a few weeks ago but missed to queue.

The rest patches are the following:
https://patchwork.kernel.org/patch/11745621/
https://patchwork.kernel.org/patch/11745633/
https://patchwork.kernel.org/patch/11745629/
https://patchwork.kernel.org/patch/11745625/
https://patchwork.kernel.org/patch/11745627/
https://patchwork.kernel.org/patch/11745635/

On 2020/9/21 10:12, Pan Nengyuan wrote:
> ping!
> 
> and cc: qemu-trivial@nongnu.org
> 
> On 2020/9/17 20:49, Pan Nengyuan wrote:
>> ping!
>>
>> Anyone queued the rest(patch 01/02/03/07/08/09)?
>>
>> On 2020/8/31 21:43, Pan Nengyuan wrote:
>>> This series fix some Error/GError memleaks.
>>>
>>> V2: 
>>>   1. remove two patches.(One has aleardy applied. The other has fixed.)
>>>   2. change patch 5/10 and 7/10.
>>>
>>> Pan Nengyuan (10):
>>>   qga/channel-posix: Plug memory leak in ga_channel_write_all()
>>>   elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init
>>>   elf2dmp/pdb: Plug memleak in pdb_init_from_file
>>>   target/i386/sev: Plug memleak in sev_read_file_base64
>>>   ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()
>>>   target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features
>>>   migration/colo: Plug memleaks in colo_process_incoming_thread
>>>   blockdev: Fix a memleak in drive_backup_prepare()
>>>   block/file-posix: fix a possible undefined behavior
>>>   vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string
>>>
>>>  block/file-posix.c         |  2 +-
>>>  blockdev.c                 |  1 +
>>>  contrib/elf2dmp/pdb.c      |  1 +
>>>  contrib/elf2dmp/qemu_elf.c |  1 +
>>>  migration/colo.c           |  5 ++++-
>>>  qga/channel-posix.c        |  6 +++++-
>>>  target/i386/cpu.c          |  1 +
>>>  target/i386/sev.c          |  1 +
>>>  ui/gtk-gl-area.c           | 11 +++++++++++
>>>  ui/vnc-auth-sasl.c         |  1 +
>>>  10 files changed, 27 insertions(+), 3 deletions(-)
>>>