memory fixes

This commit is contained in:
John Jones 2017-09-28 16:32:36 -05:00
parent 27d36d8320
commit c65301dc28
2 changed files with 4 additions and 4 deletions

View file

@ -48,9 +48,9 @@ void ipfs_core_http_request_free(struct HttpRequest* request) {
libp2p_utils_vector_free(request->params);
}
if (request->arguments != NULL) {
for(int i = 0; i < request->arguments->total; i++) {
free((char*)libp2p_utils_vector_get(request->arguments, i));
}
//for(int i = 0; i < request->arguments->total; i++) {
// free((char*)libp2p_utils_vector_get(request->arguments, i));
//}
libp2p_utils_vector_free(request->arguments);
}
free(request);

View file

@ -82,7 +82,7 @@ int ipfs_merkledag_add(struct HashtableNode* node, struct FSRepo* fs_repo, size_
ipfs_block_free(block);
return 0;
}
ipfs_block_free(block);
// TODO: call HasBlock (unsure why as yet)
return 1;
}