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/voicebus/GpakCust.h | |
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/voicebus/GpakCust.h')
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dahdi/voicebus/GpakCust.h b/drivers/dahdi/voicebus/GpakCust.h index 549922e..3842156 100644 --- a/drivers/dahdi/voicebus/GpakCust.h +++ b/drivers/dahdi/voicebus/GpakCust.h @@ -149,6 +149,11 @@ void vpmadt032_echocan_free(struct vpmadt032 *vpm, int channo, struct GpakEcanParms; void vpmadt032_get_default_parameters(struct GpakEcanParms *p); +static inline int is_cmd_write(const struct vpmadt032_cmd *cmd) +{ + return (cmd->desc & __VPM150M_WR) != 0; +} + /* If there is a command ready to go to the VPMADT032, return it, otherwise NULL */ static inline struct vpmadt032_cmd *vpmadt032_get_ready_cmd(struct vpmadt032 *vpm) { @@ -161,7 +166,7 @@ static inline struct vpmadt032_cmd *vpmadt032_get_ready_cmd(struct vpmadt032 *vp return NULL; } cmd = list_entry(vpm->pending_cmds.next, struct vpmadt032_cmd, node); - if (cmd->desc & __VPM150M_WR) + if (!is_cmd_write(cmd)) list_move_tail(&cmd->node, &vpm->active_cmds); else list_del_init(&cmd->node); |