]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #40879 from myoungwon/wip-fix-50299
authorKefu Chai <kchai@redhat.com>
Mon, 19 Apr 2021 08:29:08 +0000 (16:29 +0800)
committerGitHub <noreply@github.com>
Mon, 19 Apr 2021 08:29:08 +0000 (16:29 +0800)
osd: fix reference leak when ManifestOp is not used

Reviewed-by: Samuel Just <sjust@redhat.com>
1  2 
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

Simple merge
index c83535f2856f8556f62b341056865fb321d69c8e,f2da4f7c62dde2a967fac8eefc8f71f2c6e75e15..6018f366ca285f483b34cf46ce8c8581d2f00f0a
@@@ -258,23 -257,10 +258,23 @@@ public
    };
    typedef std::shared_ptr<FlushOp> FlushOpRef;
  
 +  struct CLSGatherOp {
 +    OpContext *ctx = nullptr;
 +    ObjectContextRef obc;
 +    OpRequestRef op;
 +    std::vector<ceph_tid_t> objecter_tids;
 +    int rval = 0;
 +
 +    CLSGatherOp(OpContext *ctx_, ObjectContextRef obc_, OpRequestRef op_)
 +      : ctx(ctx_), obc(obc_), op(op_)  {}
 +    CLSGatherOp() {}
 +    ~CLSGatherOp() {}
 +  };
 +
    friend struct RefCountCallback;
    struct ManifestOp {
-     RefCountCallback *cb;
-     ceph_tid_t objecter_tid;
+     RefCountCallback *cb = nullptr;
+     ceph_tid_t objecter_tid = 0;
      OpRequestRef op;
      std::map<uint64_t, int> results;
      std::map<uint64_t, ceph_tid_t> tids;