projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
hotplug: fix a memory leak in handle_button_complete()
[project/procd.git]
/
plug
/
hotplug.c
diff --git
a/plug/hotplug.c
b/plug/hotplug.c
index
c8bea1b
..
ce29ced
100644
(file)
--- a/
plug/hotplug.c
+++ b/
plug/hotplug.c
@@
-431,8
+431,11
@@
static void handle_button_complete(struct blob_attr *msg, struct blob_attr *data
if (!timeout)
return;
+ if (!name)
+ return;
+
b = malloc(sizeof(*b));
- if (!b
|| !name
)
+ if (!b)
return;
memset(b, 0, sizeof(*b));