summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangha <wanghamax@gmail.com>2023-07-26 11:03:25 +0800
committerGarrett D'Amore <garrett@damore.org>2023-08-23 11:19:19 -0700
commit096ad744e4858136d70eabe0bbd4f6d70d637da2 (patch)
treed5887e417f5cbef623bcb1bd019d1fde2442c077
parenta9dadb2c22f42ea6155a42388109714ed66bf48e (diff)
downloadnng-096ad744e4858136d70eabe0bbd4f6d70d637da2.tar.gz
nng-096ad744e4858136d70eabe0bbd4f6d70d637da2.tar.bz2
nng-096ad744e4858136d70eabe0bbd4f6d70d637da2.zip
fix the wrong size in stream xfr alloc.
-rw-r--r--src/testing/streams.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/streams.c b/src/testing/streams.c
index d718ab76..33c70c00 100644
--- a/src/testing/streams.c
+++ b/src/testing/streams.c
@@ -80,7 +80,7 @@ stream_xfr_alloc(nng_stream *s, void (*submit)(nng_stream *, nng_aio *),
{
stream_xfr_t *x;
- if ((x = nng_alloc(size)) == NULL) {
+ if ((x = nng_alloc(sizeof(*x))) == NULL) {
return (NULL);
}
if (nng_aio_alloc(&x->upper_aio, NULL, NULL) != 0) {