diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 21:50:28 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 21:50:28 +0200 |
commit | e70cc01c34a4a3faded4bbdd50b9b716bd2ca94c (patch) | |
tree | aa243dc5e8f215ad1554d8251078e80724a3716f /proto-shell.c | |
parent | 13cb667dc2c4131663e728bfc4bf3de465d52b20 (diff) |
fix a null pointer deref bug
Diffstat (limited to 'proto-shell.c')
-rw-r--r-- | proto-shell.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/proto-shell.c b/proto-shell.c index bb42c98..7acb4c6 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -137,7 +137,8 @@ proto_shell_teardown_cb(struct uloop_process *p, int ret) state = container_of(p, struct proto_shell_state, teardown_task); state->proto.proto_event(&state->proto, IFPEV_DOWN); - device_remove_user(&state->l3_dev); + if (state->l3_dev.dev) + device_remove_user(&state->l3_dev); } static void |