dotnwat / xmonarch

Cryptonight hash function in asm.js and WebAssembly
51 stars 17 forks source link

Fix memory leak #15

Closed erikdubbelboer closed 7 years ago

erikdubbelboer commented 7 years ago

oaes_key_import_data unconditionally allocates on the heap. When calling this function twice on the same context we leak memory. One way to fix this is to modify oaes_lib.c. But as this would make updating OpenAES more complex I choose to not reuse the context.

erikdubbelboer commented 7 years ago

Travis failed on apt-get install failed so that has nothing to do with this patch.

dotnwat commented 7 years ago

Nice catch, thanks for the pull request. Also that travis failure was just a network issue. I restarted it and its passing now.