Skip to contentSkip to conversation

NBD changes for 2.10-rc1

GIT PULL Applied Eric Blake 2 participants 3 messages Jul 28, 2017

lore
Share & tools
lore

Eric Blake

author
#0 lore raw

The following changes since commit 3aabfec2c83da500ae52fc87ff3a0a60718022db:

Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170728' into staging (2017-07-28 15:32:44 +0100)

are available in the git repository at:

git://repo.or.cz/qemu/ericb.git tags/pull-nbd-2017-07-28

for you to fetch changes up to 158b9aa568eabe614d37882dddc2eea534edc7ae:

nbd: fix memory leak in nbd_opt_go() (2017-07-28 11:58:20 -0500)

----------------------------------------------------------------
nbd patches for 2017-07-28

- Philippe Mathieu-Daudé - nbd: fix memory leak in nbd_opt_go()

----------------------------------------------------------------
Philippe Mathieu-Daudé (1):
nbd: fix memory leak in nbd_opt_go()

 nbd/client.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Signature · 1 line
2.13.3
author
#1 lore raw

[Qemu-devel] [PULL 1/1] nbd: fix memory leak in nbd_opt_go()

From: Philippe Mathieu-Daudé <[email protected]>

nbd/client.c:385:12: warning: Potential leak of memory pointed to by 'buf'

Reported-by Clang Static Analyzer

Message-Id: <[email protected]>

[introduced in commit 8ecaeae8]
---
 nbd/client.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
nbd/client.c +5 -3
index 509ed5e4ba..0a17de80b5 100644
@@ -376,9 +376,11 @@ static int nbd_opt_go(QIOChannel *ioc, const char *wantname,
     if (info->request_sizes) {
         stw_be_p(buf + 4 + len + 2, NBD_INFO_BLOCK_SIZE);
     }
-    if (nbd_send_option_request(ioc, NBD_OPT_GO,
-                                4 + len + 2 + 2 * info->request_sizes, buf,
-                                errp) < 0) {
+    error = nbd_send_option_request(ioc, NBD_OPT_GO,
+                                    4 + len + 2 + 2 * info->request_sizes,
+                                    buf, errp);
+    g_free(buf);
+    if (error < 0) {
         return -1;
     }
 
Signature · 1 line
2.13.3
#2 lore raw
In reply to Eric Blake
Quoted 15 lines · Eric Blake

The following changes since commit 3aabfec2c83da500ae52fc87ff3a0a60718022db:

Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170728' into staging (2017-07-28 15:32:44 +0100)

are available in the git repository at:

git://repo.or.cz/qemu/ericb.git tags/pull-nbd-2017-07-28

for you to fetch changes up to 158b9aa568eabe614d37882dddc2eea534edc7ae:

nbd: fix memory leak in nbd_opt_go() (2017-07-28 11:58:20 -0500)

----------------------------------------------------------------
nbd patches for 2017-07-28

Quoted 8 lines

- Philippe Mathieu-Daudé - nbd: fix memory leak in nbd_opt_go()

----------------------------------------------------------------
Philippe Mathieu-Daudé (1):
nbd: fix memory leak in nbd_opt_go()

 nbd/client.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Applied, thanks.

-- PMM