]> Git Repo - qemu.git/commitdiff
nbd: Fix bad flag detection on server
authorEric Blake <[email protected]>
Thu, 21 Jul 2016 19:34:45 +0000 (13:34 -0600)
committerPaolo Bonzini <[email protected]>
Wed, 3 Aug 2016 16:44:56 +0000 (18:44 +0200)
Commit ab7c548e added a check for invalid flags, but used an
early return on error instead of properly going through the
cleanup label.

Signed-off-by: Eric Blake <[email protected]>
Message-Id: <1469129688[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
nbd/server.c

index 29e2099b5e367fe536229c55e36e9a1834101265..3c1e2b336b94fddda8a340122572a0fce5b8cbdf 100644 (file)
@@ -1057,7 +1057,8 @@ static ssize_t nbd_co_receive_request(NBDRequest *req,
     if (request->type & ~NBD_CMD_MASK_COMMAND & ~NBD_CMD_FLAG_FUA) {
         LOG("unsupported flags (got 0x%x)",
             request->type & ~NBD_CMD_MASK_COMMAND);
-        return -EINVAL;
+        rc = -EINVAL;
+        goto out;
     }
 
     rc = 0;
This page took 0.027553 seconds and 4 git commands to generate.