projects
/
oweals
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9085551
)
procd: Fix minor null pointer dereference.
author
Rosen Penev
<rosenp@gmail.com>
Mon, 25 Dec 2017 22:52:20 +0000
(14:52 -0800)
committer
Hans Dedecker
<dedeckeh@gmail.com>
Thu, 4 Jan 2018 10:16:15 +0000
(11:16 +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 ffedba242bf450c96484abdea3c4cfc05c0eb0fe..0b801e77459acc6e86379b3490449d64ba7cb110 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;