Re: [PATCH] s390: kvm/sigp.c: fix memory leakage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 14 Jan 2013 22:39:54 +0100
Cong Ding <dinggnu@xxxxxxxxx> wrote:

> the variable inti should be freed in the branch CPUSTAT_STOPPED.
> 
> Signed-off-by: Cong Ding <dinggnu@xxxxxxxxx>
> ---
>  arch/s390/kvm/sigp.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
> index 461e841..1c48ab2 100644
> --- a/arch/s390/kvm/sigp.c
> +++ b/arch/s390/kvm/sigp.c
> @@ -137,8 +137,10 @@ static int __inject_sigp_stop(struct kvm_s390_local_interrupt *li, int action)
>  	inti->type = KVM_S390_SIGP_STOP;
> 
>  	spin_lock_bh(&li->lock);
> -	if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED))
> +	if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED)) {
> +		kfree(inti);
>  		goto out;
> +	}
>  	list_add_tail(&inti->list, &li->list);
>  	atomic_set(&li->active, 1);
>  	atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags);

Thanks, applied.

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux