Commit 8bcfbd0a authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

isdn: gigaset: use after free

I moved the kfree(cb) below the dereferences.
Signed-off-by: default avatarDan Carpenter <>
Signed-off-by: default avatarDavid S. Miller <>
parent 7e27a0ae
......@@ -1914,11 +1914,13 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb)
* The next command will reopen the AT channel automatically.
if (cb->len == 3 && !memcmp(cb->buf, "+++", 3)) {
rc = req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT);
if (cb->wake_tasklet)
return rc < 0 ? rc : cb->len;
if (!rc)
rc = cb->len;
return rc;
spin_lock_irqsave(&cs->cmdlock, flags);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment