Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: intel_sst: fix memory leak

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>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
3251627c 83285535

+1 -1
+1 -1
drivers/staging/intel_sst/intel_sst_stream_encoded.c
··· 1269 1269 dbufs->output_bytes_produced = total_output; 1270 1270 str_info->status = str_info->prev; 1271 1271 str_info->prev = STREAM_DECODE; 1272 - str_info->decode_ibuf = NULL; 1273 1272 kfree(str_info->decode_ibuf); 1273 + str_info->decode_ibuf = NULL; 1274 1274 return retval; 1275 1275 }