]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: replicatedpg: break out if we encounter error during do_pg_op()
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 29 Feb 2016 19:06:30 +0000 (03:06 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 29 Feb 2016 19:06:30 +0000 (03:06 +0800)
Otherwise:
1. The error result may be overwritten and hidden.
2. There may be potential memory leak.

Fixes: #14922
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/ReplicatedPG.cc

index 6f5a91dac124e69033bb362b1b9b575ef950a079..9d0e55e90e2b90c49c63f1ef6576ddab37175653 100644 (file)
@@ -1301,6 +1301,9 @@ void ReplicatedPG::do_pg_op(OpRequestRef op)
       result = -EINVAL;
       break;
     }
+
+    if (result < 0)
+      break;
   }
 
   // reply