diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index f93360feb6ba17ca3a8953b84996483c4cb577e3..e5b6662fdb0c2f03fd5881e104ddf2df92492723 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -2222,8 +2222,10 @@ lxcDomainParseBlkioDeviceStr(char *blkioDeviceStr, const char *type, _("unable to parse blkio device '%s' '%s'"), type, blkioDeviceStr); cleanup: - virBlkioDeviceArrayClear(result, ndevices); - VIR_FREE(result); + if (result) { + virBlkioDeviceArrayClear(result, ndevices); + VIR_FREE(result); + } return -1; }