libxl: fix use-after-free in discard_events iteration
authorMatthew Daley <mattjd@gmail.com>
Tue, 10 Sep 2013 14:34:17 +0000 (02:34 +1200)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 13 Sep 2013 12:14:37 +0000 (13:14 +0100)
commitceb556178d59d6e06871b1b921e5c8b9be084582
tree50bc81908fa873251a094396cd9b0b1494fc01f9
parenta508caf0ebc4f834bd44c1d607e5b7bfabe43e3d
libxl: fix use-after-free in discard_events iteration

We need to use the foreach variant which gets the next pointer before
the loop body is executed.

Coverity-ID: 1056193
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c