thermal: Validate new state in cur_state_store()
[platform/kernel/linux-rpi.git] / drivers / vfio / vfio.c
index 3c034fe..818e47f 100644 (file)
@@ -1850,6 +1850,7 @@ struct vfio_info_cap_header *vfio_info_cap_add(struct vfio_info_cap *caps,
        buf = krealloc(caps->buf, caps->size + size, GFP_KERNEL);
        if (!buf) {
                kfree(caps->buf);
+               caps->buf = NULL;
                caps->size = 0;
                return ERR_PTR(-ENOMEM);
        }