projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
IPv6: Use source-routing to allow multi-wan
[project/netifd.git]
/
proto-shell.c
diff --git
a/proto-shell.c
b/proto-shell.c
index
2a5eda0
..
02f1836
100644
(file)
--- a/
proto-shell.c
+++ b/
proto-shell.c
@@
-317,6
+317,7
@@
proto_shell_free(struct interface_proto_state *proto)
struct proto_shell_state *state;
state = container_of(proto, struct proto_shell_state, proto);
struct proto_shell_state *state;
state = container_of(proto, struct proto_shell_state, proto);
+ uloop_timeout_cancel(&state->teardown_timeout);
proto_shell_clear_host_dep(state);
netifd_kill_process(&state->script_task);
netifd_kill_process(&state->proto_task);
proto_shell_clear_host_dep(state);
netifd_kill_process(&state->script_task);
netifd_kill_process(&state->proto_task);
@@
-812,15
+813,12
@@
proto_shell_add_handler(const char *script, json_object *obj)
name = json_object_get_string(tmp);
name = json_object_get_string(tmp);
- handler = calloc(1, sizeof(*handler) +
- strlen(script) + 1 +
- strlen(name) + 1);
+ handler = calloc_a(sizeof(*handler) + strlen(script) + 1,
+ &str, strlen(name) + 1);
if (!handler)
return;
strcpy(handler->script_name, script);
if (!handler)
return;
strcpy(handler->script_name, script);
-
- str = handler->script_name + strlen(handler->script_name) + 1;
strcpy(str, name);
proto = &handler->proto;
strcpy(str, name);
proto = &handler->proto;