mbox series

[v5,0/2] block/nbd: fix memory leak in nbd_open

Message ID 1575517528-44312-1-git-send-email-pannengyuan@huawei.com (mailing list archive)
Headers show
Series block/nbd: fix memory leak in nbd_open | expand

Message

Pan Nengyuan Dec. 5, 2019, 3:45 a.m. UTC
From: Pan Nengyuan <pannengyuan@huawei.com>

This series add a new function to do the common cleanups, and fix a memory
leak in nbd_open when nbd_client_connect returns error status.

---
Changes v2 to v1:
- add a new function to do the common cleanups (suggested by Stefano Garzarella).
---
Changes v3 to v2:
- split in two patches(suggested by Stefano Garzarella)
---
Changes v4 to v3:
- replace function name from nbd_free_bdrvstate_prop to nbd_clear_bdrvstate and add Fixes tag(suggested by Eric Blake).
- remove static function prototype. (suggested by Eric Blake)
---
Changes v5 to v4:
- correct the wrong email address

Pan Nengyuan (2):
  block/nbd: extract the common cleanup code
  block/nbd: fix memory leak in nbd_open()

 block/nbd.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)