qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] e446a1: 9p: v9fs_path_copy() readability


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] e446a1: 9p: v9fs_path_copy() readability
Date: Tue, 20 Feb 2018 04:42:10 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e446a1eb5e358e47193a03a7a5f3ce9b8b5e36ea
      
https://github.com/qemu/qemu/commit/e446a1eb5e358e47193a03a7a5f3ce9b8b5e36ea
  Author: Marc-André Lureau <address@hidden>
  Date:   2018-02-19 (Mon, 19 Feb 2018)

  Changed paths:
    M hw/9pfs/9p.c
    M hw/9pfs/9p.h

  Log Message:
  -----------
  9p: v9fs_path_copy() readability

lhs/rhs doesn't tell much about how argument are handled, dst/src is
and const arguments is clearer in my mind. Use g_memdup() while at it.

Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>


  Commit: 6ce7177ae2e547999ef9e6f467415963991e28da
      
https://github.com/qemu/qemu/commit/6ce7177ae2e547999ef9e6f467415963991e28da
  Author: Marc-André Lureau <address@hidden>
  Date:   2018-02-19 (Mon, 19 Feb 2018)

  Changed paths:
    M hw/9pfs/9p-synth.c

  Log Message:
  -----------
  9p: fix leak in synth_name_to_path()

Leak found thanks to ASAN:

Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x55995789ac90 in __interceptor_malloc 
(/home/elmarco/src/qemu/build/x86_64-softmmu/qemu-system-x86_64+0x1510c90)
    #1 0x7f0a91190f0c in g_malloc 
/home/elmarco/src/gnome/glib/builddir/../glib/gmem.c:94
    #2 0x5599580a281c in v9fs_path_copy 
/home/elmarco/src/qemu/hw/9pfs/9p.c:196:17
    #3 0x559958f9ec5d in coroutine_trampoline 
/home/elmarco/src/qemu/util/coroutine-ucontext.c:116:9
    #4 0x7f0a8766ebbf  (/lib64/libc.so.6+0x50bbf)

Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>


  Commit: b487e2b2ff6e9fff8a45a9600d6de3a7bf82666a
      
https://github.com/qemu/qemu/commit/b487e2b2ff6e9fff8a45a9600d6de3a7bf82666a
  Author: Peter Maydell <address@hidden>
  Date:   2018-02-20 (Tue, 20 Feb 2018)

  Changed paths:
    M hw/9pfs/9p-synth.c
    M hw/9pfs/9p.c
    M hw/9pfs/9p.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging

Fix memory leak in synth backend.

# gpg: Signature made Mon 19 Feb 2018 17:29:49 GMT
# gpg:                using RSA key 71D4D5E5822F73D6
# gpg: Good signature from "Greg Kurz <address@hidden>"
# gpg:                 aka "Gregory Kurz <address@hidden>"
# gpg:                 aka "[jpeg image of size 3330]"
# Primary key fingerprint: B482 8BAF 9431 40CE F2A3  4910 71D4 D5E5 822F 73D6

* remotes/gkurz/tags/for-upstream:
  9p: fix leak in synth_name_to_path()
  9p: v9fs_path_copy() readability

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/f4718c033bfe...b487e2b2ff6e

reply via email to

[Prev in Thread] Current Thread [Next in Thread]