Prev: [PATCH 0/2] ISDN patches for 2.6.36
Next: [PATCH 02/11] isdn/gigaset: avoid copying AT commands twice
From: Tilman Schmidt on 5 Jul 2010 20:30 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(a)gmail.com> Signed-off-by: Tilman Schmidt <tilman(a)imap.cc> Acked-by: Dan Carpenter <error27(a)gmail.com> --- drivers/isdn/gigaset/i4l.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index 1d084bb..34bca37 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c @@ -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; } -- 1.6.5.3.298.g39add -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |