projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aad940
)
procd: Fix minor null pointer dereference.
author
Rosen Penev
<rosenp@gmail.com>
Mon, 25 Dec 2017 22:52:20 +0000
(14:52 -0800)
committer
John Crispin
<john@phrozen.org>
Tue, 2 Jan 2018 06:22:50 +0000
(07:22 +0100)
Null pointer check was placed after assigning values to c.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
plug/hotplug.c
patch
|
blob
|
history
diff --git
a/plug/hotplug.c
b/plug/hotplug.c
index 9fc19385d31da3bb598d27d0b88ce0b6337826eb..0905e4e95430ad8979e45c7dfc2adc2f7575220c 100644
(file)
--- a/
plug/hotplug.c
+++ b/
plug/hotplug.c
@@
-392,12
+392,12
@@
static void queue_add(struct cmd_handler *h, struct blob_attr *msg, struct blob_
&_data, blob_pad_len(data),
NULL);
- c->msg = _msg;
- c->data = _data;
-
if (!c)
return;
+ c->msg = _msg;
+ c->data = _data;
+
memcpy(c->msg, msg, blob_pad_len(msg));
memcpy(c->data, data, blob_pad_len(data));
c->handler = h->handler;