Skip to content

Conversation

@alltilla
Copy link
Collaborator

@alltilla alltilla commented Jan 28, 2019

Setting the values of riemann driver calls log_template_ref, which must be unref'd after (in the ym file).

Previously it was not unref'd, which caused memory leak every reload, because at riemann_dd_free(), the ref counters were 2.

I have seen this behavior in other drivers, too:
afsmtp, http, msg-generator

Signed-off-by: Attila Szakacs [email protected]

Setting the values of riemann driver calls `log_template_ref`,
which must be unref'd after (in the ym file).

I have seen this behavior in other drivers, too:
afsmtp, http, msg-generator

Signed-off-by: Attila Szakacs <[email protected]>
Copy link
Collaborator

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

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

👍

I think redis is affected too.

@kira-syslogng
Copy link
Contributor

Build SUCCESS

@alltilla
Copy link
Collaborator Author

I think redis is affected too.

I will check tomorrow, and open a PR, if that is the case. :)

@furiel furiel merged commit bb828c0 into syslog-ng:master Jan 29, 2019
@bazsi
Copy link
Collaborator

bazsi commented Jan 29, 2019

hmm... we should probably add a riemann_set_XXX_ref() function that consumes the ref that gets
passed to it.

That's the pattern when the call-site has a ref that would need to be unrefed.

@lbudai lbudai added this to the OSE 3.20 milestone Feb 1, 2019
@gaborznagy gaborznagy mentioned this pull request Feb 27, 2019
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.

6 participants