mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
isdn/gigaset: fix leaks in error path
Take care to free all previously allocated ressources in the "out of memory" error path of the ISDN_CMD_DIAL branch. Based on an original patch by Dan Carpenter. Impact: bugfix Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Tilman Schmidt <[email protected]> Acked-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
7d060ed287
commit
54438f9dfc
1 changed files with 2 additions and 0 deletions
|
|
@ -419,6 +419,8 @@ oom:
|
|||
dev_err(bcs->cs->dev, "out of memory\n");
|
||||
for (i = 0; i < AT_NUM; ++i)
|
||||
kfree(commands[i]);
|
||||
kfree(commands);
|
||||
gigaset_free_channel(bcs);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue