Skip to content

Commit 936ce6f

Browse files
committed
CRAN release 0.10.2
1 parent 122331f commit 936ce6f

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 0.10.1.9000
4+
Version: 0.10.2
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library providing high-performance scalability protocols, a
77
cross-platform standard for messaging and communications. Serves as a

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# nanonext 0.10.1.9000 (development)
1+
# nanonext 0.10.2
2+
3+
#### Updates
4+
5+
* Addresses one case of memory access error identified by CRAN.
26

37
# nanonext 0.10.1
48

src/aio.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,13 @@ static void raio_complete_ack(void *arg) {
215215
if (nng_aio_alloc(&aio, NULL, NULL) == 0) {
216216
nng_aio_set_msg(aio, msg);
217217
nng_ctx_send(*ctx, aio);
218+
nng_aio_wait(aio);
219+
if (nng_aio_result(aio))
220+
nng_msg_free(nng_aio_get_msg(aio));
218221
nng_aio_free(aio);
222+
} else {
223+
nng_msg_free(msg);
219224
}
220-
nng_msg_free(msg);
221225
}
222226

223227
nng_mtx_lock(shr_mtx);
@@ -227,8 +231,8 @@ static void raio_complete_ack(void *arg) {
227231
#else
228232

229233
if (nng_msg_alloc(&msg, 0) == 0) {
230-
nng_ctx_sendmsg(*ctx, msg, 0);
231-
nng_msg_free(msg);
234+
if (nng_ctx_sendmsg(*ctx, msg, 0))
235+
nng_msg_free(msg);
232236
}
233237
raio->result = res - !res;
234238

0 commit comments

Comments
 (0)