projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b81b05
)
KVM: s390: kvm/sigp.c: fix memory leakage
author
Cong Ding
<
[email protected]
>
Tue, 15 Jan 2013 10:17:29 +0000
(11:17 +0100)
committer
Gleb Natapov
<
[email protected]
>
Thu, 17 Jan 2013 06:41:48 +0000
(08:41 +0200)
the variable inti should be freed in the branch CPUSTAT_STOPPED.
Signed-off-by: Cong Ding <
[email protected]
>
Signed-off-by: Cornelia Huck <
[email protected]
>
Signed-off-by: Gleb Natapov <
[email protected]
>
arch/s390/kvm/sigp.c
patch
|
blob
|
history
diff --git
a/arch/s390/kvm/sigp.c
b/arch/s390/kvm/sigp.c
index 461e84179db1077fc32ba3ad0b266600f04e7f63..1c48ab2845e0fdab9ec19fbb03060d4346ee4ffa 100644
(file)
--- 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);