]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rgw: check pointer before dereferencing
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 27 Sep 2012 21:29:55 +0000 (14:29 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 8 Oct 2012 22:08:09 +0000 (15:08 -0700)
Fixes coverity issue 719577

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/cls/rgw/cls_rgw.cc

index 4095ecc5529a1efbcace070b0ab06ab8d1854bdf..c035be030e42d5e5487f7025e05df0c4581fdc73 100644 (file)
@@ -1023,7 +1023,8 @@ static int gc_iterate_entries(cls_method_context_t hctx, const string& marker,
         return ret;
 
       if (max_entries && (i >= max_entries)) {
-        *truncated = true;
+        if (truncated)
+          *truncated = true;
         key_iter = key;
         return 0;
       }