]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_rest_log.cc: free 'handle' to prevent memory leak
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 26 Jul 2013 19:13:54 +0000 (21:13 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 26 Jul 2013 21:55:57 +0000 (23:55 +0200)
Call complete_list_entries() at end of RGWOp_MDLog_List::execute()
to free the 'handle'.

CID 1054834 (#1-2 of 2): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "handle" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_rest_log.cc

index 544adbe796556b3751b5dcfcd6c109f409d5040a..7b50986cb374bd921220ea37eedb4db77f73707a 100644 (file)
@@ -88,6 +88,8 @@ void RGWOp_MDLog_List::execute() {
     if (!max_entries_str.empty()) 
       max_entries -= entries.size();
   } while (truncated && (max_entries > 0));
+
+  meta_log->complete_list_entries(handle);
 }
 
 void RGWOp_MDLog_List::send_response() {