Merge pull request #2919 from rubenk/virt-fix-segfault
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 5 Sep 2018 06:38:09 +0000 (08:38 +0200)
committerGitHub <noreply@github.com>
Wed, 5 Sep 2018 06:38:09 +0000 (08:38 +0200)
Fix segfault in libvirt plugin

src/virt.c

index 174db2f..39165bc 100644 (file)
@@ -1636,7 +1636,7 @@ static int lv_read(user_data_t *ud) {
       ERROR(PLUGIN_NAME
             " failed to get stats for block device (%s) in domain %s",
             state->block_devices[i].path,
-            virDomainGetName(state->domains[i].ptr));
+            virDomainGetName(state->block_devices[i].dom));
   }
 
   /* Get interface stats for each domain. */