Skip to content

Commit

Permalink
fix the wrong size in stream xfr alloc.
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghaEMQ authored and gdamore committed Aug 23, 2023
1 parent a9dadb2 commit 096ad74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/testing/streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 096ad74

Please sign in to comment.