vhost: check allocation of guest pages
authorJens Freimann <jfreiman@redhat.com>
Thu, 11 May 2017 15:25:26 +0000 (17:25 +0200)
committerYuanhan Liu <yliu@fridaylinux.org>
Fri, 16 Jun 2017 12:04:25 +0000 (14:04 +0200)
commit4cee38a6fca1f9d8ea67811090166de4393b0518
tree6dc4fe2d3324c3f81a3ae2a181f1b563d6b8c648
parentfe404930f63c2b4177ccb91e1f296a3d36a80ced
vhost: check allocation of guest pages

When we try to allocate guest pages we need to check the return value of
malloc(). Print an error message and return when it fails.

Signed-off-by: Jens Freimann <jfreiman@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/vhost_user.c