Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out_logdna: remove unused store #7629

Merged
merged 2 commits into from
Sep 23, 2023

Conversation

DavidKorczynski
Copy link
Contributor

len is assigned but never used. No need for the operations related to this.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [N/A] Example configuration file for the change
  • [N/A] Debug log output from testing the change
  • [N/A] Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • [N/A] Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

`len` is assigned but never used. No need for the operations related to
this.

Signed-off-by: David Korczynski <[email protected]>
@DavidKorczynski DavidKorczynski temporarily deployed to pr June 30, 2023 12:14 — with GitHub Actions Inactive
@DavidKorczynski DavidKorczynski temporarily deployed to pr June 30, 2023 12:14 — with GitHub Actions Inactive
@DavidKorczynski DavidKorczynski temporarily deployed to pr June 30, 2023 12:14 — with GitHub Actions Inactive
@DavidKorczynski DavidKorczynski temporarily deployed to pr June 30, 2023 12:37 — with GitHub Actions Inactive
Copy link
Collaborator

@leonardo-albertovich leonardo-albertovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it me or logdna_config_destroy doesn't release _hostname? Additionally, there are a few points in logdna_config_create where flb_free is used instead of logdna_config_destroy even after fields that need to be released have been populated.

Also the check on line 313 should be in line 321 because both branches of the conditional allocate memory, the result of flb_uri_encode is not checked and none of the results of the flb_sds_cat calls are checked either.

I'm just mentioning it in case you want to proactively fix those.

Signed-off-by: David Korczynski <[email protected]>
@DavidKorczynski DavidKorczynski temporarily deployed to pr August 8, 2023 16:57 — with GitHub Actions Inactive
@DavidKorczynski DavidKorczynski temporarily deployed to pr August 8, 2023 16:57 — with GitHub Actions Inactive
@DavidKorczynski DavidKorczynski temporarily deployed to pr August 8, 2023 16:57 — with GitHub Actions Inactive
@DavidKorczynski DavidKorczynski temporarily deployed to pr August 8, 2023 17:29 — with GitHub Actions Inactive
Copy link
Collaborator

@leonardo-albertovich leonardo-albertovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this as discussed in slack but please don't forget to issue a followup PR to replace those flb_free(ctx) calls with logdna_config_destroy(ctx), otherwise there will be leaks

@edsiper edsiper merged commit d55619e into fluent:master Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants