diff options
author | Eric Wong <bofh@yhbt.net> | 2024-03-24 21:10:43 +0000 |
---|---|---|
committer | Eric Wong <bofh@yhbt.net> | 2024-03-25 21:19:11 +0000 |
commit | 46141941e58419b3325e50eebac683baeede2c19 (patch) | |
tree | 739537e1d5b06c35110083f96f1c451655566a71 /ext/raindrops/linux_inet_diag.c | |
parent | 38eba33cb1b7b0a3c93afcaa79263e3b1daf4955 (diff) | |
download | raindrops-46141941e58419b3325e50eebac683baeede2c19.tar.gz |
While no user is likely to have enough listeners to trigger an overflow, just use ruby_xrealloc2 to be safe since it's already provided by Ruby (and AFAIK reallocarray(3) isn't standardized).
Diffstat (limited to 'ext/raindrops/linux_inet_diag.c')
-rw-r--r-- | ext/raindrops/linux_inet_diag.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/raindrops/linux_inet_diag.c b/ext/raindrops/linux_inet_diag.c index d0638d7..2fd158a 100644 --- a/ext/raindrops/linux_inet_diag.c +++ b/ext/raindrops/linux_inet_diag.c @@ -53,10 +53,10 @@ struct listen_stats { uint32_t listener_p; }; -/* override khashl.h defaults */ +/* override khashl.h defaults, these run w/o GVL */ #define kcalloc(N,Z) xcalloc(N,Z) #define kmalloc(Z) xmalloc(Z) -#define krealloc(P,Z) xrealloc(P,Z) +#define krealloc(P,Z) abort() /* never called, we use ruby_xrealloc2 */ #define kfree(P) xfree(P) #include "khashl.h" |