Found by the AddressSanitizer.
if(!buflen) {
logger(mesh, MESHLINK_DEBUG, "Invalid data\n");
+ free(buf);
meshlink_errno = MESHLINK_EPEER;
return false;
}
if(!count) {
logger(mesh, MESHLINK_DEBUG, "Invalid data\n");
+ free(buf);
meshlink_errno = MESHLINK_EPEER;
return false;
}
if(!node_write_config(mesh, n, true)) {
free_node(n);
+ free(buf);
return false;
}
// Clean up.
close_meshlink_pair(mesh_a, mesh_b);
+ free(outdata);
}
// The non-AIO transfer should have completed before everything else
assert(!timespec_lt(&out_infos[i].aio_infos[0].ts, &b_received_ts));
assert(!timespec_lt(&in_infos[i].aio_infos[0].ts, &b_received_ts));
+
+ free(in_infos[i].data);
}
// Clean up.
close_meshlink_pair(mesh_a, mesh_b);
+ free(outdata);
}
assert(meshlink_import(mesh[j], data));
}
+
+ free(data);
}
// We should know about all nodes now, and their device class.
// Done.
close_meshlink_pair(mesh1, mesh2);
+ free(invitation);
}