Date: Tue, 7 Sep 2021 21:12:58 GMT From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8c73907c66a7 - stable/13 - routing: simplify malloc flags in alloc_nhgrp(). Message-ID: <202109072112.187LCwK3024134@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=8c73907c66a766ec3a38888157c1d67ce7ae34b3 commit 8c73907c66a766ec3a38888157c1d67ce7ae34b3 Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2021-08-31 08:12:54 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2021-09-07 21:02:59 +0000 routing: simplify malloc flags in alloc_nhgrp(). (cherry picked from commit 639d7abec6cd31db9d240d6439fe6098b19eb3d8) --- sys/net/route/nhgrp_ctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c index 9f1f3a5b4bc4..6a3f853e073d 100644 --- a/sys/net/route/nhgrp_ctl.c +++ b/sys/net/route/nhgrp_ctl.c @@ -255,7 +255,6 @@ static struct nhgrp_priv * alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) { uint32_t nhgrp_size; - int flags = M_NOWAIT; struct nhgrp_object *nhg; struct nhgrp_priv *nhg_priv; @@ -266,7 +265,7 @@ alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) } size_t sz = get_nhgrp_alloc_size(nhgrp_size, num_nhops); - nhg = malloc(sz, M_NHOP, flags | M_ZERO); + nhg = malloc(sz, M_NHOP, M_NOWAIT | M_ZERO); if (nhg == NULL) { return (NULL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109072112.187LCwK3024134>