|
|
|
@ -485,6 +485,24 @@ static void __link_minimal_free(sxlink_t *co)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void __link_close_streams(sxlink_t *link)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
struct sxstream_opened *stream;
|
|
|
|
|
|
|
|
|
|
if(!link->streams) return;
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < MAX_STREAMSOPENED; i++) {
|
|
|
|
|
if(link->streams[i]) {
|
|
|
|
|
stream = link->streams[i];
|
|
|
|
|
stream->desc->ops->s_close(stream);
|
|
|
|
|
free(stream);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int __eval_sysrpc(sxlink_t *link, sexp_t *sx, int builtin)
|
|
|
|
|
{
|
|
|
|
|
sxl_rpclist_t *rpc_list;
|
|
|
|
@ -629,6 +647,7 @@ static void __link_destroy(sxlink_t *l)
|
|
|
|
|
ERR_free_strings();
|
|
|
|
|
|
|
|
|
|
close(fd);
|
|
|
|
|
__link_close_streams(l);
|
|
|
|
|
__link_second_free(l);
|
|
|
|
|
__link_minimal_free(l);
|
|
|
|
|
}
|
|
|
|
|