mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-03 13:33:29 +00:00
lapd: NULL pointer derefence possible here
The idiom seems to be to allocate the lapd_tei if it does not exist and use it then. This was found by clang --analyze.
This commit is contained in:
@@ -290,7 +290,7 @@ static void lapd_tei_receive(struct lapd_instance *li, uint8_t *data, int len)
|
|||||||
teip = teip_from_tei(li, action);
|
teip = teip_from_tei(li, action);
|
||||||
if (!teip) {
|
if (!teip) {
|
||||||
LOGP(DMI, LOGL_INFO, "TEI MGR: New TEI %u\n", action);
|
LOGP(DMI, LOGL_INFO, "TEI MGR: New TEI %u\n", action);
|
||||||
lapd_tei_alloc(li, action);
|
teip = lapd_tei_alloc(li, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send ACCEPT */
|
/* Send ACCEPT */
|
||||||
|
|||||||
Reference in New Issue
Block a user