提交 ad95fa59 编写于 作者: P Peter Krempa

storage: gluster: Don't leak private data when storage file init fails

In a44b7b87 I've introduced a function
that initializes a storage file wrapper object on gluster based volumes.

The initialization function leaks the private data pointer in case of
failure. This patch fixes it.

Reported by John Ferlan.
上级 8d8b32b0
......@@ -570,6 +570,7 @@ virStorageFileBackendGlusterInit(virStorageFilePtr file)
error:
VIR_FREE(priv->volname);
glfs_fini(priv->vol);
VIR_FREE(priv);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册