Skip to content

Commit

Permalink
Merge pull request #6840: Objecter: potential null pointer access whe…
Browse files Browse the repository at this point in the history
…n do pool_snap_list.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Feb 8, 2016
2 parents dc2ae8f + af2ced5 commit 8fc36d9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/osdc/Objecter.cc
Expand Up @@ -1312,6 +1312,8 @@ int Objecter::pool_snap_list(int64_t poolid, vector<uint64_t> *snaps)
RWLock::RLocker rl(rwlock);

const pg_pool_t *pi = osdmap->get_pg_pool(poolid);
if (!pi)
return -ENOENT;
for (map<snapid_t,pool_snap_info_t>::const_iterator p = pi->snaps.begin();
p != pi->snaps.end();
++p) {
Expand Down Expand Up @@ -2662,10 +2664,7 @@ int Objecter::_calc_target(op_target_t *t, epoch_t *last_force_resend, bool any
int Objecter::_map_session(op_target_t *target, OSDSession **s,
RWLock::Context& lc)
{
int r = _calc_target(target);
if (r < 0) {
return r;
}
_calc_target(target);
return _get_session(target->osd, s, lc);
}

Expand Down

0 comments on commit 8fc36d9

Please sign in to comment.