err_names:
kfree(header->snap_names);
header->snap_names = NULL;
+ header->snap_names_len = 0;
err_snapc:
kfree(header->snapc);
header->snapc = NULL;
static void rbd_header_free(struct rbd_image_header *header)
{
kfree(header->object_prefix);
+ header->object_prefix = NULL;
kfree(header->snap_sizes);
+ header->snap_sizes = NULL;
kfree(header->snap_names);
+ header->snap_names = NULL;
+ header->snap_names_len = 0;
ceph_put_snap_context(header->snapc);
+ header->snapc = NULL;
}
/*
out_err:
kfree(rbd_dev->header_name);
+ rbd_dev->header_name = NULL;
kfree(rbd_dev->image_name);
+ rbd_dev->image_name = NULL;
+ rbd_dev->image_name_len = 0;
kfree(rbd_dev->pool_name);
rbd_dev->pool_name = NULL;
options);
if (IS_ERR(rbd_dev->rbd_client)) {
rc = PTR_ERR(rbd_dev->rbd_client);
+ rbd_dev->rbd_client = NULL;
goto err_put_id;
}