libpod: do not dereference nil pointer

on errors the event pointer is nil.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2025-06-11 12:20:36 +02:00
parent 54afcdf6b3
commit 9922bddb1f
No known key found for this signature in database
GPG key ID: 67E38F7A8BA21772

View file

@ -169,7 +169,7 @@ func (e EventLogFile) Read(ctx context.Context, options ReadOptions) error {
event, err := newEventFromJSONString(line.Text)
if err != nil {
err := fmt.Errorf("event type %s is not valid in %s", event.Type.String(), e.options.LogFilePath)
err := fmt.Errorf("event type is not valid in %s", e.options.LogFilePath)
options.EventChannel <- ReadResult{Error: err}
continue
}