Set priv to NULL on volume deinit
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
70a410b2fe
commit
af62d14f02
@ -138,6 +138,7 @@ int ocf_volume_init(ocf_volume_t volume, ocf_volume_type_t type,
|
|||||||
err:
|
err:
|
||||||
ocf_refcnt_unfreeze(&volume->refcnt);
|
ocf_refcnt_unfreeze(&volume->refcnt);
|
||||||
env_free(volume->priv);
|
env_free(volume->priv);
|
||||||
|
volume->priv = NULL;
|
||||||
if (volume->uuid_copy && volume->uuid.data)
|
if (volume->uuid_copy && volume->uuid.data)
|
||||||
env_vfree(volume->uuid.data);
|
env_vfree(volume->uuid.data);
|
||||||
volume->uuid.data = NULL;
|
volume->uuid.data = NULL;
|
||||||
@ -150,6 +151,7 @@ void ocf_volume_deinit(ocf_volume_t volume)
|
|||||||
OCF_CHECK_NULL(volume);
|
OCF_CHECK_NULL(volume);
|
||||||
|
|
||||||
env_free(volume->priv);
|
env_free(volume->priv);
|
||||||
|
volume->priv = NULL;
|
||||||
|
|
||||||
if (volume->uuid_copy && volume->uuid.data) {
|
if (volume->uuid_copy && volume->uuid.data) {
|
||||||
env_vfree(volume->uuid.data);
|
env_vfree(volume->uuid.data);
|
||||||
|
Loading…
Reference in New Issue
Block a user