Skip to content

Commit

Permalink
net: ppp: fsm: prevent double free in Discard-Req handler
Browse files Browse the repository at this point in the history
Received net_pkt is always discarded in ppp_recv() if we return
NET_OK. Don't do this in ppp_fsm_recv_discard_req().

Signed-off-by: Marcin Niestroj <[email protected]>
  • Loading branch information
mniestroj authored and jukkar committed Jan 7, 2020
1 parent c182610 commit 0b8e5f1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions subsys/net/l2/ppp/fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,6 @@ enum net_verdict ppp_fsm_recv_discard_req(struct ppp_fsm *fsm,
NET_DBG("[%s/%p] Current state %s (%d)", fsm->name, fsm,
ppp_state_str(fsm->state), fsm->state);

net_pkt_unref(pkt);

return NET_OK;
}

Expand Down

0 comments on commit 0b8e5f1

Please sign in to comment.