Skip to contentSkip to conversation

qemu-img: Minor fixes to an amend error path

PATCH Applied Max Reitz 3 participants 5 messages Nov 19, 2018 – Nov 21, 2018

lore
Share & tools
lore
author
#2 lore raw

PATCH 2/2 qemu-img: Fix leak

In reply to Max Reitz

create_opts was leaked here. This is not too bad since the process is about to exit anyway, but relying on that does not make the code nicer to read.

Fixes d402b6a21a825a5c07aac9251990860723d49f5d
---
 qemu-img.c | 1 +
 1 file changed, 1 insertion(+)
qemu-img.c +1 -0
index a9a2470e1a..ad04f59565 100644
@@ -263,6 +263,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
         if (!proto_drv->create_opts) {
             error_report("Protocol driver '%s' does not support image creation",
                          proto_drv->format_name);
+            qemu_opts_free(create_opts);
             return 1;
         }
         create_opts = qemu_opts_append(create_opts, proto_drv->create_opts);
Signature · 1 line
2.17.2

Max Reitz

author
#0 lore raw

cover qemu-img: Minor fixes to an amend error path

One of the amend error paths has two issues that are fixed by this series. Since they are relatively minor and have been present in 3.0 already, I think there is no need to get them into 3.1. OTOH they are bug fixes, so they could go into 3.1 if you, dear reader, insist.

Max Reitz (2):
qemu-img: Fix typo
qemu-img: Fix leak

 qemu-img.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.2
author
#1 lore raw

PATCH 1/2 qemu-img: Fix typo

Fixes d402b6a21a825a5c07aac9251990860723d49f5d
---
 qemu-img.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-img.c +1 -1
index 13a6ca31b4..a9a2470e1a 100644
@@ -261,7 +261,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
             return 1;
         }
         if (!proto_drv->create_opts) {
-            error_report("Protocal driver '%s' does not support image creation",
+            error_report("Protocol driver '%s' does not support image creation",
                          proto_drv->format_name);
             return 1;
         }
Signature · 1 line
2.17.2
Reviewed-by on the v1 series
#3 lore raw
In reply to Max Reitz
Quoted 4 lines · Max Reitz

One of the amend error paths has two issues that are fixed by this series. Since they are relatively minor and have been present in 3.0 already, I think there is no need to get them into 3.1. OTOH they are bug fixes, so they could go into 3.1 if you, dear reader, insist.

I enjoy your use of "dear reader" in cover letters.

Not related to the above:

Quoted 9 lines

Max Reitz (2):
qemu-img: Fix typo
qemu-img: Fix leak

 qemu-img.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Applied
#4 lore raw
In reply to Max Reitz

Am 19.11.2018 um 11:19 hat Max Reitz geschrieben:

Quoted 4 lines

One of the amend error paths has two issues that are fixed by this series. Since they are relatively minor and have been present in 3.0 already, I think there is no need to get them into 3.1. OTOH they are bug fixes, so they could go into 3.1 if you, dear reader, insist.

Thanks, applied to the block branch (looks like the dear reader insists).

Kevin