]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_ptm.c
zebra: stream_dup cannot fail
[mirror_frr.git] / zebra / zebra_ptm.c
index fda5ef02cf1fb244e0afa653ad00ce8c6e879df1..3127d2d3042619a3358aa034adf3a96768fa8d2d 100644 (file)
@@ -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);