aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2010-07-05 10:19:19 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-07 19:57:55 -0400
commit54438f9dfcc3902a8ee74ceb8ef71316d9ef98a3 (patch)
treee7fb7cfd04940039d6bf54e15850b56a78680364
parent7d060ed2877ff6d00e7238226edbaf91493d6d0b (diff)
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 <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>
-rw-r--r--drivers/isdn/gigaset/i4l.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c
index 1d084bbb7239..34bca37d65b9 100644
--- a/drivers/isdn/gigaset/i4l.c
+++ b/drivers/isdn/gigaset/i4l.c
@@ -419,6 +419,8 @@ oom:
419 dev_err(bcs->cs->dev, "out of memory\n"); 419 dev_err(bcs->cs->dev, "out of memory\n");
420 for (i = 0; i < AT_NUM; ++i) 420 for (i = 0; i < AT_NUM; ++i)
421 kfree(commands[i]); 421 kfree(commands[i]);
422 kfree(commands);
423 gigaset_free_channel(bcs);
422 return -ENOMEM; 424 return -ENOMEM;
423} 425}
424 426