Message ID | 1586766852-208-1-git-send-email-Cedric_Hombourger@mentor.com |
---|---|
State | Accepted |
Headers | show |
Series | hawkbit: process_notification_thread shall check data_avail before status | expand |
Hi Cedric, On 13/04/20 10:34, Cedric Hombourger wrote: > Add missing check for data being available in process_notification_thread() > It would otherwise cause read of uninitialized status data (as reported by > valgrind). > > Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com> > --- > suricatta/server_hawkbit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c > index 0b0e00b..a4638af 100644 > --- a/suricatta/server_hawkbit.c > +++ b/suricatta/server_hawkbit.c > @@ -942,7 +942,7 @@ static void *process_notification_thread(void *data) > stop = true; > } > > - if (msg.data.status.current == PROGRESS) > + if (data_avail && msg.data.status.current == PROGRESS) > continue; > /* > * If there is a message > Reviewed-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 0b0e00b..a4638af 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -942,7 +942,7 @@ static void *process_notification_thread(void *data) stop = true; } - if (msg.data.status.current == PROGRESS) + if (data_avail && msg.data.status.current == PROGRESS) continue; /* * If there is a message
Add missing check for data being available in process_notification_thread() It would otherwise cause read of uninitialized status data (as reported by valgrind). Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com> --- suricatta/server_hawkbit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)