]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objecter: fix out_* initialization
authorSage Weil <sage.weil@dreamhost.com>
Fri, 27 Jan 2012 20:23:23 +0000 (12:23 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 27 Jan 2012 20:23:23 +0000 (12:23 -0800)
This looks more like the real cause for #1986.  Op ctor gets a vector of
ops but out_* aren't initialized to match.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osdc/Objecter.h

index 0814b58cecfe1cdb489ff8856c42314ab4c9e78a..7522a5929a33c687a9b4b208c921c86119a7fbdb 100644 (file)
@@ -481,6 +481,16 @@ public:
       tid(0), attempts(0),
       paused(false), objver(ov), reply_epoch(NULL) {
       ops.swap(op);
+      
+      /* initialize out_* to match op vector */
+      out_bl.resize(ops.size());
+      out_rval.resize(ops.size());
+      out_handler.resize(ops.size());
+      for (unsigned i = 0; i < ops.size(); i++) {
+       out_bl[i] = NULL;
+       out_handler[i] = NULL;
+       out_rval[i] = NULL;
+      }
 
       if (oloc.key == o)
        oloc.key.clear();