Skip to content

Commit

Permalink
lib: fix possible null pointer dereference in logreader
Browse files Browse the repository at this point in the history
Signed-off-by: Szilárd Parrag <szilard.parrag@gmail.com>
  • Loading branch information
OverOrion committed May 7, 2023
1 parent 447d97c commit 2f77d1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/logreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ log_reader_work_finished(void *s, gpointer arg)
self->notify_code = 0;
log_pipe_notify(self->control, notify_code, self);
}
if (self->super.super.flags & PIF_INITIALIZED)
if ((self->super.super.flags & PIF_INITIALIZED) && self->proto)
{
/* reenable polling the source assuming that we're still in
* business (e.g. the reader hasn't been uninitialized) */
Expand Down

0 comments on commit 2f77d1f

Please sign in to comment.