Skip to content

Commit

Permalink
handle: Close logfd when handle is freed
Browse files Browse the repository at this point in the history
As well as being tidy, this provides useful information
to the log receiving end that the handle is going away
as it will get EOF.
  • Loading branch information
chrissie-c committed Apr 9, 2021
1 parent 6d5ef32 commit cb72c1b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libknet/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ int knet_handle_free(knet_handle_t knet_h)
crypto_fini(knet_h, KNET_MAX_CRYPTO_INSTANCES + 1); /* values above MAX_CRYPTO will release all crypto resources */
compress_fini(knet_h, 1);
_destroy_locks(knet_h);
close(knet_h->logfd);

free(knet_h);
knet_h = NULL;
Expand Down

0 comments on commit cb72c1b

Please sign in to comment.