Memory fix in tcp_transport_dialer

yamux
John Jones 2017-04-27 08:14:19 -05:00
parent f061d03cfa
commit 9caba0aa00
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ int libp2p_conn_tcp_write(const struct Connection* connection, const char* in, s
}
struct Connection* libp2p_conn_tcp_dial(const struct TransportDialer* transport_dialer, const struct MultiAddress* addr) {
struct Connection* conn = (struct Connection*) malloc(sizeof(struct Connection*));
struct Connection* conn = (struct Connection*) malloc(sizeof(struct Connection));
conn->socket_handle = socket_open4();
char* ip;
int port = multiaddress_get_ip_port(addr);

View File

@ -90,7 +90,7 @@ int test_peer_protobuf() {
retVal = 1;
exit:
multiaddress_free(ma);
//multiaddress_free(ma);
libp2p_peer_free(peer);
libp2p_peer_free(peer_result);
if (protobuf != NULL)