Skip to contentSkip to conversation

qcow2: Don't ignore failure to clear autoclear flags

PATCH New Kevin Wolf 1 participant 1 message May 11, 2012 Block layer

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 qcow2: Don't ignore failure to clear autoclear flags

---
 block/qcow2.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
block/qcow2.c +4 -1
index 3bae2d8..655799c 100644
@@ -300,7 +300,10 @@ static int qcow2_open(BlockDriverState *bs, int flags)
 
     if (!bs->read_only && s->autoclear_features != 0) {
         s->autoclear_features = 0;
-        qcow2_update_header(bs);
+        ret = qcow2_update_header(bs);
+        if (ret < 0) {
+            goto fail;
+        }
     }
 
     /* Check support for various header values */
Signature · 1 line
1.7.6.5