Page MenuHomeFreeBSD

syslogd: Fix issues reported by gcc
ClosedPublic

Authored by markj on Fri, Nov 29, 7:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 4:24 PM
Unknown Object (File)
Wed, Dec 4, 1:29 AM
Unknown Object (File)
Sat, Nov 30, 6:52 PM
Subscribers

Details

Summary
  • When forwaring a message, don't assume that f->f_num_addr_fds > 0.
  • Avoid calling free() on a stack-allocated object.

Fixes: f4b4a10abb26 ("syslogd: Move selector parsing into its own function")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Fri, Nov 29, 7:52 PM
jfree added inline comments.
usr.sbin/syslogd/syslogd.c
1798

I think f_num_addr_fds should always be greater than 0 here (since the filed would be invalid if it didn't have any target addresses), but this certainly does not hurt. LGTM

This revision is now accepted and ready to land.Sat, Nov 30, 4:18 PM
This revision was automatically updated to reflect the committed changes.