From fa75f402aeb7450e946aefac9de879c5ec043f13 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Tue, 26 Mar 2013 14:08:14 +0000 Subject: [PATCH] Return ENOMEM if malloc() fails. --- sys/netgraph/netflow/netflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c index a0e8535a7f54..f230616a5dbd 100644 --- a/sys/netgraph/netflow/netflow.c +++ b/sys/netgraph/netflow/netflow.c @@ -574,7 +574,7 @@ ng_netflow_fib_init(priv_p priv, int fib) if ((fe = malloc(sizeof(struct fib_export), M_NETGRAPH, M_NOWAIT | M_ZERO)) == NULL) - return (1); + return (ENOMEM); mtx_init(&fe->export_mtx, "export dgram lock", NULL, MTX_DEF); mtx_init(&fe->export9_mtx, "export9 dgram lock", NULL, MTX_DEF);