X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fdisk_model.c;h=b142547f8b6b18639a5be963f0f312fef16f3fd9;hb=65286d916b384837567b0da69b4d5a77f190fdc0;hp=c1d8836dcacad5a001b5b2dcaa438f2ec6afd66d;hpb=72420d58d18ec71d4777d029daaf0c6a1c820b32;p=palacios.git diff --git a/palacios/src/devices/disk_model.c b/palacios/src/devices/disk_model.c index c1d8836..b142547 100644 --- a/palacios/src/devices/disk_model.c +++ b/palacios/src/devices/disk_model.c @@ -58,8 +58,12 @@ static uint64_t model_get_capacity(void * private_data) { return model->ops->get_capacity(model->private_data); } -static int model_free(struct vm_device * dev) { - return -1; +static int model_free(struct disk_state * model) { + + // unhook from frontend + + V3_Free(model); + return 0; } @@ -73,7 +77,7 @@ static struct v3_dev_blk_ops blk_ops = { static struct v3_device_ops dev_ops = { - .free = model_free, + .free = (int (*)(void *))model_free, };