proto-shell: fix potential use-after-free
authorFelix Fietkau <nbd@openwrt.org>
Mon, 19 Mar 2012 19:07:12 +0000 (20:07 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 19 Mar 2012 19:07:12 +0000 (20:07 +0100)
proto-shell.c

index 492d0e4..2239b49 100644 (file)
@@ -201,6 +201,8 @@ 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);
+       netifd_kill_process(&state->script_task);
+       netifd_kill_process(&state->proto_task);
        free(state->config);
        free(state);
 }
        free(state->config);
        free(state);
 }