virt plugin: Avoid NULL pointer deference
authorFrancesco Romani <fromani@redhat.com>
Wed, 23 Nov 2016 17:50:18 +0000 (18:50 +0100)
committerFrancesco Romani <fromani@redhat.com>
Wed, 30 Nov 2016 09:27:00 +0000 (10:27 +0100)
commitc84646c105b7ea2b47b58fb470e5222da71323ca
treefc050b3b147623133360940692f6fff17b4e2a0b
parent452324c4a5b6ec07575cfc5d5d339852b040509b
virt plugin: Avoid NULL pointer deference

As per pull request review. Moving the variable assignement after
the check avoid any potential issues in the future.

Signed-off-by: Francesco Romani <fromani@redhat.com>
src/virt.c