Fix small memory leak.
This commit is contained in:
parent
dd69216c75
commit
0e24b0a1d3
2 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ int ipfs_node_online_protocol_handlers_free(struct Libp2pVector* handlers) {
|
|||
for(int i = 0; i < handlers->total; i++) {
|
||||
struct Libp2pProtocolHandler* current = (struct Libp2pProtocolHandler*) libp2p_utils_vector_get(handlers, i);
|
||||
current->Shutdown(current->context);
|
||||
free(current);
|
||||
}
|
||||
libp2p_utils_vector_free(handlers);
|
||||
return 1;
|
||||
|
|
|
@ -287,6 +287,7 @@ int test_bitswap_retrieve_file_known_remote() {
|
|||
libp2p_logger_add_class("null");
|
||||
libp2p_logger_add_class("online");
|
||||
libp2p_logger_add_class("multistream");
|
||||
libp2p_logger_add_class("secio");
|
||||
|
||||
char* ipfs_path = "/tmp/test1";
|
||||
char* peer_id_1 = NULL, *peer_id_2 = NULL;
|
||||
|
|
Loading…
Reference in a new issue