fix segfault introduced by commit de640d85fa

That commit introduces the line 'cur_con->put()' which has the possibility
of being called while cur_con is not initialized.
This commit is contained in:
root 2011-05-15 08:54:13 -05:00 committed by Sage Weil
parent cd75a9d2be
commit e93c0fc08b

View File

@ -227,8 +227,10 @@ int MonClient::get_monmap_privately()
hunting = true; // reset this to true!
cur_mon.clear();
cur_con->put();
cur_con = NULL;
if (cur_con) {
cur_con->put();
cur_con = NULL;
}
if (monmap.epoch)
return 0;