]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/async/rdma: check allocated memory immediately before using it
authorChangcheng Liu <changcheng.liu@intel.com>
Thu, 25 Apr 2019 05:02:29 +0000 (13:02 +0800)
committerChangcheng Liu <changcheng.liu@intel.com>
Thu, 25 Apr 2019 06:08:00 +0000 (14:08 +0800)
commit09c9fa11acb5ed051c6269cf51ffe99b5eb9fe67
tree913388f10d11a231da0bf4be171d35bdc4111c8c
parent7a35128e39a66da900dc77f53f39b5f704401e79
msg/async/rdma: check allocated memory immediately before using it

The new "allocation functions" will through exception if it failes to
allocate space. There's no need to assert(devices) here for every
get_device operation.
Refer to: https://en.cppreference.com/w/cpp/memory/new/bad_alloc

Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
src/msg/async/rdma/Infiniband.h