Bladeren bron

Update network_tcp.c

melkorb 5 jaren geleden
bovenliggende
commit
f9ceec7be7
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  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;