Memory allocation shouldn't be allowed to fail. CC: Neil McKee <[email protected]> Reported-by: neeraj mehta <[email protected]> Reported-at: http://openvswitch.org/pipermail/discuss/2015-September/018776.html Signed-off-by: Ben Pfaff <[email protected]> --- 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 [email protected] chen zhang [email protected] kk yap [email protected] likunyun [email protected] +neeraj mehta [email protected] rahim entezari [email protected] 俊 赵 [email protected] 冯全树(Crab) [email protected] 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 [email protected] http://openvswitch.org/mailman/listinfo/dev
