projects
/
platform
/
core
/
system
/
pass.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
caa9465
)
resource: process: Check return value of nla_put_u32
69/272269/3
submit/tizen/20220314.032636
author
Chanwoo Choi
<cw00.choi@samsung.com>
Mon, 14 Mar 2022 02:42:14 +0000
(11:42 +0900)
committer
Chanwoo Choi
<cw00.choi@samsung.com>
Mon, 14 Mar 2022 02:28:39 +0000
(
02:28
+0000)
Change-Id: I2b31cd1d531d3ca219b535efed5e39c1a1a74698
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/resource/resource-process.c
patch
|
blob
|
history
diff --git
a/src/resource/resource-process.c
b/src/resource/resource-process.c
index
d4940aa
..
831f3b5
100644
(file)
--- a/
src/resource/resource-process.c
+++ b/
src/resource/resource-process.c
@@
-351,7
+351,9
@@
static int query_taskstats(struct taskstats *stats, int cmd_type, pid_t pid)
genlmsg_put(msg, NL_AUTO_PID, NL_AUTO_SEQ, ret, 0, 0, TASKSTATS_CMD_GET, TASKSTATS_VERSION);
- nla_put_u32(msg, cmd_type, pid);
+ ret = nla_put_u32(msg, cmd_type, pid);
+ if (ret < 0)
+ goto err_genl_close;
ret = nl_send_auto_complete(sock, msg);
nlmsg_free(msg);