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

rtpengine: fix pkg mem leak in send_rtpp_command() #3813

Merged

Conversation

vijaykumar-exotel
Copy link
Contributor

Pre-Submission Checklist

  • Commit message has the format required by CONTRIBUTING guide
  • Commits are split per component (core, individual modules, libs, utils, ...)
  • Each component has a single commit (if not, squash them into one commit)
  • No commits to README files for modules (changes must be done to docbook files
    in doc/ subfolder, the README file is autogenerated)

Type Of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)

Checklist:

Description

  • freed request.s after sending request to websocket in send_rtpp_command method.

- freed request.s after sending request to websocket
@henningw
Copy link
Contributor

Looks good to me. The lwsc module seems to malloc its own memory for the sdata, so it should be freed in rtpengine module code.

@vijaykumar-exotel
Copy link
Contributor Author

Hi @henningw ,
memory is getting allocated in line 3660 , which was not getting freed.
request.s = pkg_malloc(len + 1);

@henningw
Copy link
Contributor

Hi @henningw , memory is getting allocated in line 3660 , which was not getting freed. request.s = pkg_malloc(len + 1);

Sure. :-) I checked in the lwsc module (which is actually called from the rtpengine module in this function part) to no have a double free. If nobody else comment, I will merge it tomorrow.

@vijaykumar-exotel
Copy link
Contributor Author

Sure. Thanks @henningw

@henningw henningw merged commit b4753ae into kamailio:master Apr 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants