Skip to content

Commit

Permalink
open_telemetry plugin: Minor cleanups.
Browse files Browse the repository at this point in the history
* Set field to `NULL` after freeing.
* Remove unused global variable.
  • Loading branch information
octo committed Feb 20, 2024
1 parent 4c83fc0 commit 7061ad2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/open_telemetry_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ static void ot_callback_decref(void *data) {
sfree(cb->port);

delete cb->ssl_opts;
cb->ssl_opts = NULL;

pthread_mutex_unlock(&cb->mu);
pthread_mutex_destroy(&cb->mu);
Expand Down
1 change: 0 additions & 1 deletion src/open_telemetry_receiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ struct Listener {
grpc::SslServerCredentialsOptions *ssl;
};
static std::vector<Listener> listeners;
static grpc::string default_addr("0.0.0.0:4317");

/*
* helper functions
Expand Down

0 comments on commit 7061ad2

Please sign in to comment.