Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17b6a39f authored by Tom Cherry's avatar Tom Cherry Committed by Android Git Automerger
Browse files

am af59eec7: am e83d8a69: Merge "Fix memory leak in parse_action"

* commit 'af59eec7':
  Fix memory leak in parse_action
parents 51c6ad17 af59eec7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -946,7 +946,14 @@ static void *parse_action(struct parse_state *state, int nargs, char **args)
    for (i = 1; i < nargs; i++) {
        if (!(i % 2)) {
            if (strcmp(args[i], "&&")) {
                struct listnode *node;
                struct listnode *node2;
                parse_error(state, "& is the only symbol allowed to concatenate actions\n");
                list_for_each_safe(node, node2, &act->triggers) {
                    struct trigger *trigger = node_to_item(node, struct trigger, nlist);
                    free(trigger);
                }
                free(act);
                return 0;
            } else
                continue;