/* 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)) {
/* Allocate more messages. */
msg = stream_dup(msgc);
- if (msg == NULL) {
- zlog_debug("%s: not enough memory", __func__);
- return;
- }
}
stream_free(msgc);
/* 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)) {
/* Allocate more messages. */
msg = stream_dup(msgc);
- if (msg == NULL) {
- zlog_debug("%s: not enough memory", __func__);
- return;
- }
}
stream_free(msgc);