Return ENOMEM if malloc() fails.

This commit is contained in:
Gleb Smirnoff 2013-03-26 14:08:14 +00:00
parent a23a2dd138
commit fa75f402ae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248725

View file

@ -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);