Re: [PATCH] fix memory leak on kvm_vm_ioctl_create_spapr_tce
From: David Hildenbrand
Date: Wed Aug 23 2017 - 05:16:36 EST
>>> + mutex_unlock(&kvm->lock);
>>> + kvm_put_kvm(kvm);
>>> + goto fail;
>>> + }
>>> + return ret;
>
> of simply
>
> if (!ret)
if (ret >= 0)
return ret;
is of course what I meant :)
> return 0;
>
> mutex_lock(&kvm->lock);
> list_del_rcu(&stt->list);
> mutex_unlock(&kvm->lock);
> kvm_put_kvm(kvm);
--
Thanks,
David