fix bugs reported by valgrind

This commit is contained in:
Max Lv
2013-01-01 15:35:13 +08:00
parent b16ac605ce
commit 93d7bf896f
4 changed files with 3 additions and 1 deletions
Binary file not shown.
+1 -1
View File
@@ -38,7 +38,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := shadowsocks
LOCAL_SRC_FILES := shadowsocks/local.c shadowsocks/encrypt.c
LOCAL_CFLAGS := -Wall -O2 -I$(LOCAL_PATH)/libev/ -I$(LOCAL_PATH)/openssl/include -std=c99
LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -I$(LOCAL_PATH)/libev/ -I$(LOCAL_PATH)/openssl/include
LOCAL_STATIC_LIBRARIES := libev libcrypto
+2
View File
@@ -446,6 +446,7 @@ struct remote* new_remote(int fd) {
remote->recv_ctx->connected = 0;
remote->send_ctx->remote = remote;
remote->send_ctx->connected = 0;
remote->buf_len = 0;
return remote;
}
@@ -490,6 +491,7 @@ struct server* new_server(int fd) {
server->e_ctx = NULL;
server->d_ctx = NULL;
}
server->buf_len = 0;
return server;
}
void free_server(struct server *server) {
Binary file not shown.