Skip to content

Commit

Permalink
isdn/gigaset: fix leaks in error path
Browse files Browse the repository at this point in the history
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 <error27@gmail.com>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tilman Schmidt authored and David S. Miller committed Jul 7, 2010
1 parent 7d060ed commit 54438f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/isdn/gigaset/i4l.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ static int command_from_LL(isdn_ctrl *cntrl)
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;
}

Expand Down

0 comments on commit 54438f9

Please sign in to comment.