diff options
| author | Dima Zavin <dima@android.com> | 2011-08-26 13:59:18 -0700 |
|---|---|---|
| committer | Dima Zavin <dima@android.com> | 2011-08-26 14:03:32 -0700 |
| commit | 3bea0790e23811d9139f5b39e9b126445fee061c (patch) | |
| tree | 39b497c2ebbcb5175a4c21fd12bb04162361fdfa /init | |
| parent | bb86bc5892374f3a41784135bebc7ada3270c8c1 (diff) | |
| download | system_core-3bea0790e23811d9139f5b39e9b126445fee061c.tar.gz system_core-3bea0790e23811d9139f5b39e9b126445fee061c.tar.bz2 system_core-3bea0790e23811d9139f5b39e9b126445fee061c.zip | |
init: check for list empty when getting commands for action
Change-Id: Id42d6a6b6297919b2e6520e074e31b5e01ae17bc
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'init')
| -rwxr-xr-x | init/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/init.c b/init/init.c index a1d6be10..ef42e025 100755 --- a/init/init.c +++ b/init/init.c @@ -491,7 +491,7 @@ static struct command *get_first_command(struct action *act) { struct listnode *node; node = list_head(&act->commands); - if (!node) + if (!node || list_empty(&act->commands)) return NULL; return node_to_item(node, struct command, clist); |
