Skip to content

Commit

Permalink
Staging: intel_sst: fix memory leak
Browse files Browse the repository at this point in the history
The original code set "str_info->decode_ibuf" to NULL so the kfree() is
no-op.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Nov 16, 2010
1 parent 8328553 commit 3251627
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/intel_sst/intel_sst_stream_encoded.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ int sst_decode(int str_id, struct snd_sst_dbufs *dbufs)
dbufs->output_bytes_produced = total_output;
str_info->status = str_info->prev;
str_info->prev = STREAM_DECODE;
str_info->decode_ibuf = NULL;
kfree(str_info->decode_ibuf);
str_info->decode_ibuf = NULL;
return retval;
}

0 comments on commit 3251627

Please sign in to comment.