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:
9f233f5
)
hotplug-dispatch: yet another rare memory leak disovered by Coverity
author
Daniel Golle
<daniel@makrotopia.org>
Fri, 13 Aug 2021 18:04:08 +0000
(19:04 +0100)
committer
Daniel Golle
<daniel@makrotopia.org>
Sat, 14 Aug 2021 17:57:44 +0000
(18:57 +0100)
Free newly allocated hotplug context in case of premature return.
Coverity CID:
1490077
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
hotplug-dispatch.c
patch
|
blob
|
history
diff --git
a/hotplug-dispatch.c
b/hotplug-dispatch.c
index cfba7d19b745725bbf0e81eadd9639055e4b45c7..f1ece3833f235d59b321d6d9bd89ea3ef621fcd9 100644
(file)
--- a/
hotplug-dispatch.c
+++ b/
hotplug-dispatch.c
@@
-298,7
+298,7
@@
static int hotplug_call(struct ubus_context *ctx, struct ubus_object *obj,
/* glob'ing for hotplug scripts */
if (asprintf(&globstr, "%s/%s/*", HOTPLUG_BASEDIR, subsys) == -1) {
-
env_free(envp
);
+
hotplug_free(pc
);
return UBUS_STATUS_UNKNOWN_ERROR;
}