Skip to content

Commit

Permalink
Merge #1383: util: remove unused checked_realloc
Browse files Browse the repository at this point in the history
b097a46 util: remove unused checked_realloc (Cory Fields)

Pull request description:

  Usage was removed in 6fe5043 . This should be a NOOP.

  Noticed when analyzing for zenbleed exposure: stdlib calls that aren't optimized away.

  In this case realloc isn't making it into the final binary, but as far as I can tell this is completely dead code and should be dropped.

ACKs for top commit:
  jonasnick:
    ACK b097a46
  real-or-random:
    ACK b097a46

Tree-SHA512: d4249215eddd4035be2b50a8bb48b8a681abdab4ab41ca53f6c2a2507edfbc9ffa39ba22eb48e7da52f978e224198294495ce64f9d571d98c19283b20b82a63a
  • Loading branch information
real-or-random committed Jul 26, 2023
2 parents 2bd5f3e + b097a46 commit 0e00fc7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ static SECP256K1_INLINE void *checked_malloc(const secp256k1_callback* cb, size_
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;
}

#if defined(__BIGGEST_ALIGNMENT__)
#define ALIGNMENT __BIGGEST_ALIGNMENT__
#else
Expand Down

0 comments on commit 0e00fc7

Please sign in to comment.