]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: migration: Make check for empty hook XML robust
authorPeter Krempa <pkrempa@redhat.com>
Wed, 22 Oct 2014 09:27:36 +0000 (11:27 +0200)
committerCole Robinson <crobinso@redhat.com>
Sat, 15 Nov 2014 21:02:04 +0000 (16:02 -0500)
Also consider whitespace only strings returned from the hook as empty
result.

(cherry picked from commit 19b1ee42b49b2764f7df23787f4b6022886a612c)

src/qemu/qemu_migration.c

index 284cd5adbf1b03a46082ca1bfd864c0bd58dcec6..2a96661a01c85e628a31ed1a7adc3bead924438c 100644 (file)
@@ -2570,7 +2570,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
         if (hookret < 0) {
             goto cleanup;
         } else if (hookret == 0) {
-            if (!*xmlout) {
+            if (virStringIsEmpty(xmlout)) {
                 VIR_DEBUG("Migrate hook filter returned nothing; using the"
                           " original XML");
             } else {