Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix syslog.c
  • Loading branch information
funny-falcon committed Jan 6, 2012
commit 083c6ebc1a23680fb2600ae49a4169fa65dce84d
2 changes: 1 addition & 1 deletion ext/syslog/syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static VALUE mSyslog_close(VALUE self)

closelog();

free((void *)syslog_ident);
xfree((void *)syslog_ident);
Copy link
Member

Choose a reason for hiding this comment

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

syslog_ident is allocated by malloc in strdup, so this should be wrong

Copy link
Author

Choose a reason for hiding this comment

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

strdup is overwritten by #include "ruby/util.h" on top of syslog.c

syslog_ident = NULL;
syslog_options = syslog_facility = syslog_mask = -1;
syslog_opened = 0;
Expand Down