add check to avoid Segmentation fault

This commit is contained in:
aipsel
2015-12-27 18:20:04 +08:00
parent bc14591df9
commit b86ecbbd5c
+3
View File
@@ -362,6 +362,9 @@ static void manager_recv_cb(EV_P_ ev_io *w, int revents)
}
char *action = get_action(buf, r);
if (action == NULL) {
return;
}
if (strcmp(action, "add") == 0) {
struct server *server = get_server(buf, r);