Added original uuid deinitialization without freeing

There is a risk that without uuid.data pointer denitialization it will
be freed during original volume deinit, zeroing uuid.data pointer
prevents that.

Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
Michal Rakowski 2019-04-02 10:42:34 +02:00
parent cc30794160
commit a6c75b9900

View File

@ -143,6 +143,7 @@ void ocf_volume_move(ocf_volume_t volume, ocf_volume_t from)
*/ */
from->opened = false; from->opened = false;
from->priv = NULL; from->priv = NULL;
from->uuid.data = NULL;
} }
int ocf_volume_create(ocf_volume_t *volume, ocf_volume_type_t type, int ocf_volume_create(ocf_volume_t *volume, ocf_volume_type_t type,