projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a03d972
)
RK31/RK30:add vfree(buf); to fix memory leaks in video_state_write();
author
cym
<cym@rock-chips.com>
Tue, 17 Sep 2013 06:18:07 +0000
(14:18 +0800)
committer
cym
<cym@rock-chips.com>
Tue, 17 Sep 2013 06:18:07 +0000
(14:18 +0800)
arch/arm/plat-rk/ddr_freq.c
patch
|
blob
|
history
diff --git
a/arch/arm/plat-rk/ddr_freq.c
b/arch/arm/plat-rk/ddr_freq.c
index 5ec16e38b7ef2c1c812c8e60d817ed742ebd1fe5..52d01020dca0a2135cd97d82ef3508ce9fea5448 100755
(executable)
--- a/
arch/arm/plat-rk/ddr_freq.c
+++ b/
arch/arm/plat-rk/ddr_freq.c
@@
-302,8
+302,10
@@
static ssize_t video_state_write(struct file *file, const char __user *buffer,
cookie_pot = buf;
if (count < 1)
+ vfree(buf);
return count;
if (copy_from_user(cookie_pot, buffer, count)) {
+ vfree(buf);
return -EFAULT;
}
@@
-349,10
+351,12
@@
static ssize_t video_state_write(struct file *file, const char __user *buffer,
}
break;
default:
+ vfree(buf);
return -EINVAL;
}
ddr.video_state = state;
+ vfree(buf);
return count;
}