Przeglądaj źródła

Update network_tcp.c

melkorb 5 lat temu
rodzic
commit
f9ceec7be7
1 zmienionych plików z 1 dodań i 0 usunięć
  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;