qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fix two small memleaks
@ 2020-02-27  1:29 Pan Nengyuan
  2020-02-27  1:29 ` [PATCH v2 1/2] block/qcow2: do free crypto_opts in qcow2_close() Pan Nengyuan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pan Nengyuan @ 2020-02-27  1:29 UTC (permalink / raw)
  To: kwolf, mreitz
  Cc: euler.robot, Pan Nengyuan, qemu-devel, qemu-block,
	zhang.zhanghailiang

This series fix two small memleaks.
1. 'crypto_opts' forgot to free in qcow2_close(), do this cleanup in qcow2_close();
2. Do free filename/format in collect_image_check() when we re-allocate it.  

v2->v1:
- Instead of freeing part of fields in collect_image_check(), do discard the old check object and allocate a new one in the caller to make more sense.(suggested by Max Reitz)

Pan Nengyuan (2):
  block/qcow2: do free crypto_opts in qcow2_close()
  qemu-img: free memory before re-assign

 block/qcow2.c | 1 +
 qemu-img.c    | 2 ++
 2 files changed, 3 insertions(+)

-- 
2.18.2



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-27 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27  1:29 [PATCH v2 0/2] fix two small memleaks Pan Nengyuan
2020-02-27  1:29 ` [PATCH v2 1/2] block/qcow2: do free crypto_opts in qcow2_close() Pan Nengyuan
2020-02-27  1:29 ` [PATCH v2 2/2] qemu-img: free memory before re-assign Pan Nengyuan
2020-02-27 15:24 ` [PATCH v2 0/2] fix two small memleaks Max Reitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).