You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the following code, I get all kinds of crashes, and valgrind says that the free is incorrect, reporting numerous use after-free errors. If I comment out the ZT_Node_freeQueryResult, then everything works. The docs in the ZeroTierOne.h header indicate that ZT_Node_networkConfig's return should be freed with freeQueryResult. Something isn't right.
ZT_VirtualNetworkConfig *vcfg;
int status;
int rv;
nni_mtx_lock(&zt_lk);
vcfg = ZT_Node_networkConfig(ztn->zn_znode, nwid);
if (vcfg == NULL) {
nni_mtx_unlock(&zt_lk);
return (NNG_ECLOSED);
}
status = vcfg->status;
ZT_Node_freeQueryResult(ztn->zn_znode, vcfg);
nni_mtx_unlock(&zt_lk);
The text was updated successfully, but these errors were encountered:
Given the following code, I get all kinds of crashes, and valgrind says that the free is incorrect, reporting numerous use after-free errors. If I comment out the ZT_Node_freeQueryResult, then everything works. The docs in the ZeroTierOne.h header indicate that ZT_Node_networkConfig's return should be freed with freeQueryResult. Something isn't right.
The text was updated successfully, but these errors were encountered: