fix bugs reported by valgrind
This commit is contained in:
Binary file not shown.
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user