diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-03-06 18:55:54 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-03-12 15:14:07 +0100 |
commit | 622d241998b6a981483594712b039190ee94eff8 (patch) | |
tree | a9f22500e17db7013434332cb2ba6103000295ee /blockdev.c | |
parent | b8c6f29eb84cd3ccbbf23a5951224ae33f11116b (diff) |
use QSIMPLEQ_FOREACH_SAFE when freeing list elements
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c index 0e8666a874..3abc1dab84 100644 --- a/blockdev.c +++ b/blockdev.c @@ -736,7 +736,7 @@ void qmp_blockdev_group_snapshot_sync(SnapshotDevList *dev_list, int ret = 0; SnapshotDevList *dev_entry = dev_list; SnapshotDev *dev_info = NULL; - BlkGroupSnapshotStates *states; + BlkGroupSnapshotStates *states, *next; BlockDriver *proto_drv; BlockDriver *drv; int flags; @@ -842,7 +842,7 @@ delete_and_fail: } } exit: - QSIMPLEQ_FOREACH(states, &snap_bdrv_states, entry) { + QSIMPLEQ_FOREACH_SAFE(states, &snap_bdrv_states, entry, next) { g_free(states); } return; |