Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 10, 2024
1 parent bdc2bbb commit 0c54373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ static void iaio_finalizer(SEXP xptr) {
nng_aio_free(xp->aio);
if (xp->data != NULL)
R_Free(xp->data);
// release linked list node if cb has already run
if (xp->cb != NULL && TAG((SEXP) xp->cb) == R_NilValue)
nano_ReleaseObject((SEXP) xp->cb);
R_Free(xp);

}
Expand Down
5 changes: 2 additions & 3 deletions src/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ static void thread_disp_finalizer(SEXP xptr) {
ncv->condition = -1;
nng_cv_wake(cv);
nng_mtx_unlock(mtx);
if (xp->tls != NULL) {
if (xp->tls != NULL)
nng_tls_config_free(xp->tls);
}
nng_thread_destroy(xp->thr);
nng_url_free(xp->up);
for (int i = 0; i < xp->n; i++) {
Expand Down Expand Up @@ -760,7 +759,7 @@ static void rnng_dispatch_thread(void *args) {
for (R_xlen_t i = 0; i < n; i++)
nng_close(sock[i]);
fail:
nng_close(hsock);
nng_close(hsock);

}

Expand Down

0 comments on commit 0c54373

Please sign in to comment.