out_stackdriver: fix multiple memory leaks and potential corruption [Backport to 4.2]#11916
Conversation
- Update fetch_metadata to use flb_sds_t * to handle sds reallocation correctly - Use temporary variable in fetch_metadata to avoid leaking original SDS on failure - Fix error handling in fetch_metadata when flb_sds_copy fails - Fix memory leaks in stackdriver.c by destroying rval and http_request in failure paths - Fix memory leak in stackdriver_conf.c by destroying project_id before overwriting it Signed-off-by: Tim Bai <timbai@google.com> (cherry picked from commit 2da48de)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I am unable to assign @JeffLuoo for some reason. |
Backporting #11879
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:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
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.