qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] ebee92: qemu-img: Plug memory leak on block o


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] ebee92: qemu-img: Plug memory leak on block option help er...
Date: Mon, 02 Jun 2014 08:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ebee92b4fef9defa19a8c348ec8b2716732ad4df
      
https://github.com/qemu/qemu/commit/ebee92b4fef9defa19a8c348ec8b2716732ad4df
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: Plug memory leak on block option help error path

Introduced in commit a283cb6; mostly harmless.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 75e347d66ab81944b5b657d17cc90ef92af3f016
      
https://github.com/qemu/qemu/commit/75e347d66ab81944b5b657d17cc90ef92af3f016
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  block/vvfat: Plug memory leak in enable_write_target()

I figure the leak originated in bdrv_create2(), and was duplicated
into callers when commit 91a073a dropped that function.  Looks like
the other places have since been fixed.

Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: a1904e48c4a9fb114d155419700bfb7d760273b9
      
https://github.com/qemu/qemu/commit/a1904e48c4a9fb114d155419700bfb7d760273b9
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: Plug memory leak on qcow2_invalidate_cache() error paths

Introduced in commit 5a8a30d.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b20e61e0d52eef57cf5db55087b16e0b5207e730
      
https://github.com/qemu/qemu/commit/b20e61e0d52eef57cf5db55087b16e0b5207e730
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Plug memory leak on brv_open_image() error path

Introduced in commit da557a.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 443422fde7cb8410849074181de7b91bfd13b19d
      
https://github.com/qemu/qemu/commit/443422fde7cb8410849074181de7b91bfd13b19d
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M qemu-io.c

  Log Message:
  -----------
  qemu-io: Support multiple -o in open command

Instead of ignoring all option values but the last one, multiple -o
options now have the same meaning as having a single option with all
settings in the order of their respective -o options.

Same as commit 2dc8328 for qemu-img convert, except here we do it with
QemuOpts rather than QEMUOptionParameter.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 29f2601aa605f0af0cba8eedcff7812c6c8532e9
      
https://github.com/qemu/qemu/commit/29f2601aa605f0af0cba8eedcff7812c6c8532e9
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M qemu-io.c

  Log Message:
  -----------
  qemu-io: Plug memory leak in open command

Introduced in commit b543c5c.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 543f7bef1353be4b30543aa1888048a7b6abb2e9
      
https://github.com/qemu/qemu/commit/543f7bef1353be4b30543aa1888048a7b6abb2e9
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M qemu-io.c

  Log Message:
  -----------
  qemu-io: Don't print NULL when open without non-option arg fails

Reproducer: "open -o a=b".  Broken in commit fd0fee3.

Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6376f9522372d589f3efe60001dc0486237dd375
      
https://github.com/qemu/qemu/commit/6376f9522372d589f3efe60001dc0486237dd375
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Plug memory leak in blockdev_init()

blockdev_init() leaks bs_opts when qemu_opts_create() fails, i.e. when
the ID is bad.  Missed in commit ec9c10d.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 3cb0e25c4b417b7336816bd92de458f0770d49ff
      
https://github.com/qemu/qemu/commit/3cb0e25c4b417b7336816bd92de458f0770d49ff
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Plug memory leak in drive_init()

bs_opts is leaked on all paths from its qdev_new() that don't got
through blockdev_init().  Add the missing QDECREF(), and zap bs_opts
after blockdev_init(), so the new QDECREF() does nothing when we go
through blockdev_init().

Leak introduced in commit f298d07.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f25391c2a6ef1674384204265429520ea50e82bc
      
https://github.com/qemu/qemu/commit/f25391c2a6ef1674384204265429520ea50e82bc
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block/qapi.c

  Log Message:
  -----------
  block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR

Introduced in commit a8d8ecb.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 6262bbd363b53a1f19c473345d7cc40254dd5c73
      
https://github.com/qemu/qemu/commit/6262bbd363b53a1f19c473345d7cc40254dd5c73
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  block/vvfat: Plug memory leak in check_directory_consistency()

On error path.  Introduced in commit a046433a.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: b122c3b6d020e529b203836efb8f611ece787293
      
https://github.com/qemu/qemu/commit/b122c3b6d020e529b203836efb8f611ece787293
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  block/vvfat: Plug memory leak in read_directory()

Has always been leaky.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2df5fee2dbd56a9c34afd6d7df6744da2d951ccb
      
https://github.com/qemu/qemu/commit/2df5fee2dbd56a9c34afd6d7df6744da2d951ccb
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block/sheepdog.c

  Log Message:
  -----------
  block/sheepdog: Plug memory leak in sd_snapshot_create()

Has always been leaky.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: bb9cd2ee99f6537c072d5f4bac441717d3cd2bed
      
https://github.com/qemu/qemu/commit/bb9cd2ee99f6537c072d5f4bac441717d3cd2bed
  Author: Markus Armbruster <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: Plug memory leak in convert command

Introduced in commit 661a0f7.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 675036e4dadd2426c93c54d7f7155f519eda53e6
      
https://github.com/qemu/qemu/commit/675036e4dadd2426c93c54d7f7155f519eda53e6
  Author: Peter Maydell <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block/raw-posix.c

  Log Message:
  -----------
  block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX

In the MacOSX specific code in raw-posix.c we use the define
LONG_LONG_MAX. This is actually a non-standard pre-C99 define;
switch to using the standard LLONG_MAX instead.

This apparently fixes a compilation failure with certain
compiler/OS versions (though it is unclear which).

Reported-by: Peter Bartoli <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: c13959c745a7e4965c94d19e3153d2c44459906d
      
https://github.com/qemu/qemu/commit/c13959c745a7e4965c94d19e3153d2c44459906d
  Author: Fam Zheng <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: Fix local_err in vmdk_create

In vmdk_create and vmdk_create_extent, initialize local_err before using
it, and don't leak it on error.

Reported-by: Markus Armbruster <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 55d492d7602c27cabb605f42e72c755de1c186c1
      
https://github.com/qemu/qemu/commit/55d492d7602c27cabb605f42e72c755de1c186c1
  Author: Max Reitz <address@hidden>
  Date:   2014-06-02 (Mon, 02 Jun 2014)

  Changed paths:
    M qemu-img.c

  Log Message:
  -----------
  qemu-img: Report error even with --oformat=json

img_check() should report that the format of the given image does not
support checks even if JSON output is desired. JSON data is output to
stdout, as opposed to error messages, which are (in the case of
qemu-img) printed to stderr. Therefore, it is easy to distinguish
between the two.

Also, img_info() does already use error_report() for human-readable
messages even though JSON output is desired (through
collect_image_info_list()).

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f72b49398ffabf7276026a850cd7c1bba266cc4d
      
https://github.com/qemu/qemu/commit/f72b49398ffabf7276026a850cd7c1bba266cc4d
  Author: Peter Maydell <address@hidden>
  Date:   2014-06-02 (Mon, 02 Jun 2014)

  Changed paths:
    M block.c
    M block/qapi.c
    M block/qcow2.c
    M block/raw-posix.c
    M block/sheepdog.c
    M block/vmdk.c
    M block/vvfat.c
    M blockdev.c
    M qemu-img.c
    M qemu-io.c

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

Block patches

# gpg: Signature made Mon 02 Jun 2014 14:56:00 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"

* remotes/kevin/tags/for-upstream:
  qemu-img: Report error even with --oformat=json
  vmdk: Fix local_err in vmdk_create
  block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX
  qemu-img: Plug memory leak in convert command
  block/sheepdog: Plug memory leak in sd_snapshot_create()
  block/vvfat: Plug memory leak in read_directory()
  block/vvfat: Plug memory leak in check_directory_consistency()
  block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR
  blockdev: Plug memory leak in drive_init()
  blockdev: Plug memory leak in blockdev_init()
  qemu-io: Don't print NULL when open without non-option arg fails
  qemu-io: Plug memory leak in open command
  qemu-io: Support multiple -o in open command
  block: Plug memory leak on brv_open_image() error path
  qcow2: Plug memory leak on qcow2_invalidate_cache() error paths
  block/vvfat: Plug memory leak in enable_write_target()
  qemu-img: Plug memory leak on block option help error path

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


Compare: https://github.com/qemu/qemu/compare/9bb931802e6a...f72b49398ffa

reply via email to

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