Memory allocation shouldn't be allowed to fail.
CC: Neil McKee <neil.mckee@inmon.com>
Reported-by: neeraj mehta <mehtaneeraj07@gmail.com>
Reported-at: http://openvswitch.org/pipermail/discuss/2015-September/018776.html
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
chen zhang 3zhangchen9211@gmail.com
kk yap yapkke@stanford.edu
likunyun kunyunli@hotmail.com
+neeraj mehta mehtaneeraj07@gmail.com
rahim entezari rahim.entezari@gmail.com
俊 赵 zhaojun12@outlook.com
冯全树(Crab) fqs888@126.com
sflow_agent_alloc_cb(void *magic OVS_UNUSED, SFLAgent *agent OVS_UNUSED,
size_t bytes)
{
- return calloc(1, bytes);
+ return xzalloc(bytes);
}
/* sFlow library callback to free memory. */