-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
lib: fix route map description memory leak #6681
Conversation
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
LGTM I'll push in once CI finishes |
lib/routemap.c
Outdated
@@ -971,6 +971,10 @@ void route_map_index_delete(struct route_map_index *index, int notify) | |||
zlog_debug("Deleting route-map %s sequence %d", | |||
index->map->name, index->pref); | |||
|
|||
/* Free route map entry description. */ | |||
if (index->description) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No check please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Route map entries are not getting a chance to call `description` string deallocation on shutdown or when the parent entry is destroyed, so lets add a code to handle this in the `route_map_index_delete` function. Signed-off-by: Rafael Zalamena <[email protected]>
0f626a2
to
f095133
Compare
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12972/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12974/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
Summary
Fixes #6659 .
Route map entries are not getting a chance to call
description
stringdeallocation on shutdown or when the parent entry is destroyed, so lets
add a code to handle this in the
route_map_index_delete
function.This PR might need to be backported to 7.4.