-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Memory leaks + enhanced logging #3156
Conversation
…into v2/master
…into v2/master
Systematically log problems in update_rule_target_ex(). Fix some memory leaks in update_rule_target_ex().
if(target_list == NULL) | ||
return apr_psprintf(ruleset->mp, "Error to update target - memory allocation");; | ||
if (target_list == NULL) { | ||
my_error_msg = apr_psprintf(ruleset->mp, "Error to update target - memory allocation"); |
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.
Here (and at some other cases) you removed the return
statement and after set of my_error_msg
you jump to the label end
. There you call an msr_log(msr, 9, my_error_msg)
and always return with NULL.
But the calling places return this value, so may be that char *
needs there - isn't it?
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.
You're right, I fixed the return value
|
replaced by #3191 |
Log audit lock name in case of problem.
Systematically log problems in update_rule_target_ex().
Fix some memory leaks in update_rule_target_ex().