Fix lock resource leak in events/syslog (#5552)
Fix lock resource leak in events/syslog (#5552)

Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5552

This fixes a potential resource leak in the `syslog` event type. If the process is unable to `flock` then the FD is reset (overwritten to -1) and not closed.

Reviewed By: guliashvili

Differential Revision: D14700407

fbshipit-source-id: 092a22c3059d29aca748ee23ba30c5301cd065af

hackgnar/osquery,hackgnar/osquery,hackgnar/osquery