18 lines
503 B
Diff
18 lines
503 B
Diff
|
71,86d70
|
||
|
< static SECP256K1_INLINE void *checked_malloc(const secp256k1_callback* cb, size_t size) {
|
||
|
< void *ret = malloc(size);
|
||
|
< if (ret == NULL) {
|
||
|
< secp256k1_callback_call(cb, "Out of memory");
|
||
|
< }
|
||
|
< return ret;
|
||
|
< }
|
||
|
<
|
||
|
< static SECP256K1_INLINE void *checked_realloc(const secp256k1_callback* cb, void *ptr, size_t size) {
|
||
|
< void *ret = realloc(ptr, size);
|
||
|
< if (ret == NULL) {
|
||
|
< secp256k1_callback_call(cb, "Out of memory");
|
||
|
< }
|
||
|
< return ret;
|
||
|
< }
|
||
|
<
|