[spandsp] scan-build: Dereference of null pointer - at_put_response()

This commit is contained in:
Dragos Oancea 2020-02-12 22:20:28 +00:00
parent c714401935
commit d1f751eb8e
1 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,8 @@ SPAN_DECLARE(void) at_put_response(at_state_t *s, const char *t)
{ {
uint8_t buf[3]; uint8_t buf[3];
if (!s) return;
buf[0] = s->p.s_regs[3]; buf[0] = s->p.s_regs[3];
buf[1] = s->p.s_regs[4]; buf[1] = s->p.s_regs[4];
buf[2] = '\0'; buf[2] = '\0';