]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::fill_in_copy_get: fix early return bug
authorSamuel Just <sam.just@inktank.com>
Tue, 4 Mar 2014 23:21:09 +0000 (15:21 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 5 Mar 2014 03:23:00 +0000 (19:23 -0800)
This is not a leak: we are in an else block where cb must
be NULL.  The fix as introduced did not include braces on
the if causing the method to return unconditionally.

Fixes: #7604
Introduced in: 500206d809f0cd85cd99e4f0ec164bbf74f92c28
Reviewed-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 5fee83428f78f55d1cd1757028e5aff01635c5c5..c95a7e59f70ba33613a2f98a49eb0680ffd05a3a 100644 (file)
@@ -5274,9 +5274,6 @@ int ReplicatedPG::fill_in_copy_get(
        result = pgbackend->objects_read_sync(
          oi.soid, cursor.data_offset, left, &bl);
        if (result < 0)
-         if (cb) {
-           delete cb;
-         }
          return result;
       }
       assert(result <= left);