vl.c: remove init_clocks call from main
commit02ce232c5051854bf49e6d2816c65e00f6d7e036
authorKirill Batuzov <batuzovk@ispras.ru>
Tue, 6 May 2014 12:59:53 +0000 (6 16:59 +0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 9 May 2014 18:57:32 +0000 (9 20:57 +0200)
treeb250aca2293310da6fbf6a396a6f34dd67f9df84
parentb1e6fc0817dca14a3581d7b0979a5885608981f2
vl.c: remove init_clocks call from main

Clocks are initialized in qemu_init_main_loop. They are not needed before it.
Initializing them twice is not only unnecessary but is harmful: it results in
memory leak and potentially can lead to a situation where different parts of
QEMU use different sets of timers.

To avoid it remove init_clocks call from main and add an assertion to
qemu_clock_init that corresponding clock has not been initialized yet.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-timer.c
vl.c