diff options
| author | Rafael Zalamena <rzalamena@users.noreply.github.com> | 2022-06-16 10:58:05 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-16 10:58:05 -0300 |
| commit | 952071e44a3ec4179de412d957777a8a35cf4f8c (patch) | |
| tree | 863ab8ad10d33a335f5a5d86d41b609c179a2713 /zebra/zebra_ptm.c | |
| parent | f3d6bfd13e933abeca38fcd86be705916987f039 (diff) | |
| parent | d9db1a4092300970f9112c67556c1f4e860dabe0 (diff) | |
Merge pull request #11414 from donaldsharp/memory_cannot_fail
Memory cannot fail
Diffstat (limited to 'zebra/zebra_ptm.c')
| -rw-r--r-- | zebra/zebra_ptm.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c index fda5ef02cf..3127d2d304 100644 --- a/zebra/zebra_ptm.c +++ b/zebra/zebra_ptm.c @@ -1294,10 +1294,6 @@ static void zebra_ptm_send_bfdd(struct stream *msg) /* Create copy for replication. */ msgc = stream_dup(msg); - if (msgc == NULL) { - zlog_debug("%s: not enough memory", __func__); - return; - } /* Send message to all running BFDd daemons. */ for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) { @@ -1308,10 +1304,6 @@ static void zebra_ptm_send_bfdd(struct stream *msg) /* Allocate more messages. */ msg = stream_dup(msgc); - if (msg == NULL) { - zlog_debug("%s: not enough memory", __func__); - return; - } } stream_free(msgc); @@ -1326,10 +1318,6 @@ static void zebra_ptm_send_clients(struct stream *msg) /* Create copy for replication. */ msgc = stream_dup(msg); - if (msgc == NULL) { - zlog_debug("%s: not enough memory", __func__); - return; - } /* Send message to all running client daemons. */ for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) { @@ -1340,10 +1328,6 @@ static void zebra_ptm_send_clients(struct stream *msg) /* Allocate more messages. */ msg = stream_dup(msgc); - if (msg == NULL) { - zlog_debug("%s: not enough memory", __func__); - return; - } } stream_free(msgc); |
