Memory fix in tcp_transport_dialer
This commit is contained in:
parent
f061d03cfa
commit
9caba0aa00
2 changed files with 2 additions and 2 deletions
|
@ -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* 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();
|
conn->socket_handle = socket_open4();
|
||||||
char* ip;
|
char* ip;
|
||||||
int port = multiaddress_get_ip_port(addr);
|
int port = multiaddress_get_ip_port(addr);
|
||||||
|
|
|
@ -90,7 +90,7 @@ int test_peer_protobuf() {
|
||||||
|
|
||||||
retVal = 1;
|
retVal = 1;
|
||||||
exit:
|
exit:
|
||||||
multiaddress_free(ma);
|
//multiaddress_free(ma);
|
||||||
libp2p_peer_free(peer);
|
libp2p_peer_free(peer);
|
||||||
libp2p_peer_free(peer_result);
|
libp2p_peer_free(peer_result);
|
||||||
if (protobuf != NULL)
|
if (protobuf != NULL)
|
||||||
|
|
Loading…
Reference in a new issue