compression: Fix nullpointer deref
When the creation of a new compression entity fails, an error message is created, this error message contains printf with a dereferentiation of the compression entity, that is clearly NULL at that point. This commit corrects that. Change-Id: I87371ade0ccd6a93b446f2013c1747f486739518
This commit is contained in:
parent
f6e51709fc
commit
d0ef1ed78c
|
@ -107,13 +107,14 @@ static struct gprs_sndcp_comp *gprs_sndcp_comp_create(const void *ctx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Display info message */
|
/* Bail on failure */
|
||||||
if (comp_entity == NULL) {
|
if (comp_entity == NULL) {
|
||||||
LOGP(DSNDCP, LOGL_ERROR,
|
LOGP(DSNDCP, LOGL_ERROR,
|
||||||
"Compression entity (%d) creation failed!\n",
|
"Compression entity creation failed!\n");
|
||||||
comp_entity->entity);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Display info message */
|
||||||
if (comp_entity->compclass == SNDCP_XID_PROTOCOL_COMPRESSION) {
|
if (comp_entity->compclass == SNDCP_XID_PROTOCOL_COMPRESSION) {
|
||||||
LOGP(DSNDCP, LOGL_INFO,
|
LOGP(DSNDCP, LOGL_INFO,
|
||||||
"New header compression entity (%d) created.\n",
|
"New header compression entity (%d) created.\n",
|
||||||
|
|
Loading…
Reference in New Issue