src/lib/*.c: avoid list_head_init() if unnecessary

Spotted this in a few places: if a function returns (or errors out)
before using a local list, there's no need to init that list.

In such places, move list_init() to just before using the list,
avoiding the unnecessary initialization.

Should not have any visible effect whatsoever, except for 0.002ns
improvements in a few paths :)

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
4 files changed