ptm_cb.t_timer = NULL;
thread_add_timer(zrouter.master, zebra_ptm_connect, NULL,
ptm_cb.reconnect_time, &ptm_cb.t_timer);
- return (-1);
+ return -1;
case BUFFER_PENDING:
ptm_cb.t_write = NULL;
thread_add_write(zrouter.master, zebra_ptm_flush_messages, NULL,
break;
}
- return (0);
+ return 0;
}
static int zebra_ptm_send_message(char *data, int size)
thread_add_timer(zrouter.master, zebra_ptm_connect, NULL,
ptm_cb.reconnect_time,
&ptm_cb.t_timer);
- return (-1);
+ return -1;
}
ptm_cb.t_read = NULL;
}
stream_free(msgc);
+ stream_free(msg);
}
static void zebra_ptm_send_clients(struct stream *msg)
}
stream_free(msgc);
+ stream_free(msg);
}
static int _zebra_ptm_bfd_client_deregister(struct zserv *zs)
stream_putw_at(msgc, 0, STREAM_READABLE(msgc));
zebra_ptm_send_bfdd(msgc);
+ msgc = NULL;
/* Registrate process PID for shutdown hook. */
STREAM_GETL(msg, ppid);
return;
stream_failure:
- stream_free(msgc);
+ if (msgc)
+ stream_free(msgc);
zlog_err("%s:%d failed to registrate client pid", __FILE__, __LINE__);
}