Skip to contentSkip to conversation

nfs: Fix error path in nfs_options_qdict_to_qapi()

PATCH Applied Kevin Wolf 3 participants 3 messages May 16, 2018 Block layer

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 nfs: Fix error path in nfs_options_qdict_to_qapi()

Don't throw away local_err, but propagate it to errp.

---
 block/nfs.c | 1 +
 1 file changed, 1 insertion(+)
block/nfs.c +1 -0
index d6364d28bb..3349b67a76 100644
@@ -571,6 +571,7 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
     qobject_unref(crumpled);
 
     if (local_err) {
+        error_propagate(errp, local_err);
         return NULL;
     }
 
Signature · 1 line
2.13.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Kevin Wolf

Don't throw away local_err, but propagate it to errp.

---
  block/nfs.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 14 lines
block/nfs.c +1 -0
index d6364d28bb..3349b67a76 100644
@@ -571,6 +571,7 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
      qobject_unref(crumpled);
 
      if (local_err) {
+        error_propagate(errp, local_err);
          return NULL;
      }
 
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
Applied
#2 lore raw
In reply to Kevin Wolf
Quoted 22 lines · Kevin Wolf

Don't throw away local_err, but propagate it to errp.

---
 block/nfs.c | 1 +
 1 file changed, 1 insertion(+)
block/nfs.c +1 -0
index d6364d28bb..3349b67a76 100644
@@ -571,6 +571,7 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
     qobject_unref(crumpled);
 
     if (local_err) {
+        error_propagate(errp, local_err);
         return NULL;
     }
 
Signature · 1 line
2.13.6

Thanks,

Applied to my block branch:

git://github.com/codyprime/qemu-kvm-jtc block

-Jeff