瀏覽代碼

Update network_tcp.c

melkorb 5 年之前
父節點
當前提交
f9ceec7be7
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      arch/network_tcp.c

+ 1 - 0
arch/network_tcp.c

@@ -774,6 +774,7 @@ UA_ClientConnectionTCP_init(UA_ConnectionConfig config, const UA_String endpoint
 
     TCPClientConnection *tcpClientConnection = (TCPClientConnection*) UA_malloc(
                     sizeof(TCPClientConnection));
+    memset(tcpClientConnection, 0, sizeof(TCPClientConnection));
     connection.handle = (void*) tcpClientConnection;
     tcpClientConnection->timeout = timeout;
     UA_String hostnameString = UA_STRING_NULL;