]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: drop rest op reference in error path 8636/head
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 19 Apr 2016 13:11:09 +0000 (06:11 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 19 Apr 2016 13:11:09 +0000 (06:11 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_cr_rest.h

index 40743488bfb3b251bcb9652ac5bfe9bea882ad78..147784f0f10128aabff10367a5cf48cb72347116 100644 (file)
@@ -95,6 +95,7 @@ public:
     int ret = op->aio_send(bl);
     if (ret < 0) {
       lsubdout(cct, rgw, 0) << "ERROR: failed to send post request" << dendl;
+      op->put();
       return ret;
     }
     std::swap(http_op, op); // store reference in http_op on success
@@ -115,6 +116,7 @@ public:
           << " status=" << op->get_http_status() << std::endl;
       lsubdout(cct, rgw, 0) << "ERROR: failed to wait for op, ret=" << ret
           << ": " << op->to_str() << dendl;
+      op->put();
       return ret;
     }
     return 0;