]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: drop useless ENOMEM check
authorSage Weil <sage@newdream.net>
Thu, 25 Mar 2010 17:19:43 +0000 (10:19 -0700)
committerSage Weil <sage@newdream.net>
Thu, 25 Mar 2010 17:20:30 +0000 (10:20 -0700)
'new' will throw an exception if it fails, not return NULL.

src/osd/OSD.cc

index fbe90852c4a05097b8e3c1d85757b1aa289767f8..d504220b7b353029330af6fbb1ca0cdeb23912ec 100644 (file)
@@ -1700,11 +1700,6 @@ bool OSD::ms_verify_authorizer(Connection *con, int peer_type,
     Session *s = (Session *)con->get_priv();
     if (!s) {
       s = new Session;
-      if (!s) {
-        dout(0) << "ouch.. out of memory, can't open session" << dendl;
-        isvalid = false;
-        return false;
-      }
       con->set_priv(s->get());
       dout(10) << " new session " << s << dendl;
     }