diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-04-03 17:50:28 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-04-03 17:50:28 +0000 |
commit | cebcd751ed0330235cf833a41460a6b9f48efb8c (patch) | |
tree | 3c536080c7dff1ba0e40dea084e30db2bc1b2d2f /drivers/dahdi/wcte12xp/base.c | |
parent | 2136804d4a5c49bd61a877e5e761f85211016786 (diff) |
wcte12xp, wctdm24xxp: Close a memory leak when processing VPM commands.
Closes a memory leak when processing the VPM write commands introduced in
r8454.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8460 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wcte12xp/base.c')
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index a1f1c42..7645634 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -259,7 +259,7 @@ inline void cmd_decipher_vpmadt032(struct t1 *wc, const u8 *readchunk) cmd->data = (0xff & readchunk[CMD_BYTE(2, 1, 1)]) << 8; cmd->data |= readchunk[CMD_BYTE(2, 2, 1)]; if (cmd->desc & __VPM150M_WR) { - kfree(&cmd->node); + kfree(cmd); } else { cmd->desc |= __VPM150M_FIN; complete(&cmd->complete); @@ -503,6 +503,9 @@ static void cmd_dequeue_vpmadt032(struct t1 *wc, unsigned char *writechunk, int writechunk[CMD_BYTE(4, 1, 1)] = 0; writechunk[CMD_BYTE(4, 2, 1)] = 0; } + if (is_cmd_write(cmd)) + kfree(cmd); + } else if (test_and_clear_bit(VPM150M_SWRESET, &vpm->control)) { for (x = 0; x < 7; x++) { if (0 == x) { |