stats: Only dereference a connection pointer after checking for NULL.
Addresses CID 210261. Change-Id: Ic7e7c92c5b9ff696fa7f4cd0d69451cd22333f71
This commit is contained in:
parent
0ae129e9f0
commit
169c229d27
|
@ -1104,7 +1104,7 @@ static int dtap_rcvmsg(struct gsm_subscriber_connection *conn,
|
||||||
struct msgb *gsm48;
|
struct msgb *gsm48;
|
||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
int rc, dtap_rc;
|
int rc, dtap_rc;
|
||||||
struct rate_ctr *ctrs = conn->sccp.msc->msc_ctrs->ctr;
|
struct rate_ctr *ctrs;
|
||||||
|
|
||||||
LOGP(DMSC, LOGL_DEBUG, "Rx MSC DTAP: %s\n",
|
LOGP(DMSC, LOGL_DEBUG, "Rx MSC DTAP: %s\n",
|
||||||
osmo_hexdump(msg->l3h, length));
|
osmo_hexdump(msg->l3h, length));
|
||||||
|
@ -1114,6 +1114,7 @@ static int dtap_rcvmsg(struct gsm_subscriber_connection *conn,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctrs = conn->sccp.msc->msc_ctrs->ctr;
|
||||||
header = (struct dtap_header *) msg->l3h;
|
header = (struct dtap_header *) msg->l3h;
|
||||||
if (sizeof(*header) >= length) {
|
if (sizeof(*header) >= length) {
|
||||||
rate_ctr_inc(&ctrs[MSC_CTR_BSSMAP_RX_DTAP_ERROR]);
|
rate_ctr_inc(&ctrs[MSC_CTR_BSSMAP_RX_DTAP_ERROR]);
|
||||||
|
|
Loading…
Reference in New Issue