]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: RGWReadRESTResourceCR, fix refcounting
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 3 May 2016 17:01:33 +0000 (10:01 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 9 May 2016 21:36:40 +0000 (14:36 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_cr_rest.h

index c10592a0064c8846da1f6e8f251f54e1dda51f4d..33c806b3a33424fa1064496ad586ddc40ba0c123 100644 (file)
@@ -39,6 +39,7 @@ public:
     if (ret < 0) {
       log_error() << "failed to send http operation: " << op->to_str()
           << " ret=" << ret << std::endl;
+      op->put();
       return ret;
     }
     std::swap(http_op, op); // store reference in http_op on success
@@ -51,8 +52,10 @@ public:
     if (ret < 0) {
       error_stream << "http operation failed: " << op->to_str()
           << " status=" << op->get_http_status() << std::endl;
+      op->put();
       return ret;
     }
+    op->put();
     return 0;
   }