Memory allocation shouldn't be allowed to fail. CC: Neil McKee <neil.mc...@inmon.com> Reported-by: neeraj mehta <mehtaneera...@gmail.com> Reported-at: http://openvswitch.org/pipermail/discuss/2015-September/018776.html Signed-off-by: Ben Pfaff <b...@nicira.com> --- AUTHORS | 1 + ofproto/ofproto-dpif-sflow.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/AUTHORS b/AUTHORS index a7f40bb..b348942 100644 --- a/AUTHORS +++ b/AUTHORS @@ -385,6 +385,7 @@ ankur dwivedi ankurengg2...@gmail.com chen zhang 3zhangchen9...@gmail.com kk yap yap...@stanford.edu likunyun kunyu...@hotmail.com +neeraj mehta mehtaneera...@gmail.com rahim entezari rahim.entez...@gmail.com 俊 赵 zhaoju...@outlook.com 冯全树(Crab) fqs...@126.com diff --git a/ofproto/ofproto-dpif-sflow.c b/ofproto/ofproto-dpif-sflow.c index 260c01b..d479997 100644 --- a/ofproto/ofproto-dpif-sflow.c +++ b/ofproto/ofproto-dpif-sflow.c @@ -136,7 +136,7 @@ static void * 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. */ -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev