浏览代码

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>
Dan Carpenter 14 年之前
父节点
当前提交
3251627c94
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/intel_sst/intel_sst_stream_encoded.c

+ 1 - 1
drivers/staging/intel_sst/intel_sst_stream_encoded.c

@@ -1269,7 +1269,7 @@ finish:
 	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;
 }