skynet_free(NULL) is ok

This commit is contained in:
Cloud Wu
2014-10-28 17:14:30 +08:00
parent 1d3e393fd4
commit aaf8617dd5

View File

@@ -61,8 +61,7 @@ forward_message(int type, bool padding, struct socket_message * result) {
if (skynet_context_push((uint32_t)result->opaque, &message)) {
// todo: report somewhere to close socket
// don't call skynet_socket_close here (It will block mainloop)
if (sm->buffer)
skynet_free(sm->buffer);
skynet_free(sm->buffer);
skynet_free(sm);
}
}