util: fix memleak in virStorageSourceClear

snapshot and configFile are not freed, free them.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
This commit is contained in:
zhang bo 2015-04-27 17:26:31 +08:00 committed by Martin Kletzander
parent 9dc57ce2c4
commit ab7cd11e0b

View File

@ -2038,6 +2038,8 @@ virStorageSourceClear(virStorageSourcePtr def)
VIR_FREE(def->path);
VIR_FREE(def->volume);
VIR_FREE(def->snapshot);
VIR_FREE(def->configFile);
virStorageSourcePoolDefFree(def->srcpool);
VIR_FREE(def->driverName);
virBitmapFree(def->features);