[PATCH v2 0/2] introduce QEMU_AUTO_VFREE

Vladimir Sementsov-Ogievskiy posted 2 patches 2 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210628121133.193984-1-vsementsov@virtuozzo.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>, John Snow <jsnow@redhat.com>
include/qemu/osdep.h | 15 +++++++++++++++
block/commit.c       | 25 +++++++++----------------
2 files changed, 24 insertions(+), 16 deletions(-)
[PATCH v2 0/2] introduce QEMU_AUTO_VFREE
Posted by Vladimir Sementsov-Ogievskiy 2 years, 10 months ago
Hi all!

There is a good movement to use g_autofree macro, that helps to
automatically call g_free on exit from code block.

We lack similar possibility for qemu_memalign() functions family. Let's
add, it seems rather simple with help of "cleanup" attribute.

v2: rewrite 01 (as first version was just wrong)

Vladimir Sementsov-Ogievskiy (2):
  introduce QEMU_AUTO_VFREE
  block/commit: use QEMU_AUTO_VFREE

 include/qemu/osdep.h | 15 +++++++++++++++
 block/commit.c       | 25 +++++++++----------------
 2 files changed, 24 insertions(+), 16 deletions(-)

-- 
2.29.2