[PATCH] fix memory leak on kvm_vm_ioctl_create_spapr_tce

David Hildenbrand david at redhat.com
Wed Aug 23 19:16:24 AEST 2017


>>> +               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


More information about the Linuxppc-dev mailing list