• Tilman Schmidt's avatar
    isdn/gigaset: fix non-heap pointer deallocation · b8324f94
    Tilman Schmidt authored
    at_state structures may be allocated individually or as part of a
    cardstate or bc_state structure. The disconnect() function handled
    both cases, creating a risk that it might try to deallocate an
    at_state structure that had not been allocated individually.
    Fix by splitting disconnect() into two variants handling cases
    with and without an associated B channel separately, and adding
    an explicit check.
    
    Spotted with Coverity.
    Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b8324f94
ev-layer.c 47.8 KB