From: Dan Carpenter Date: Sat, 13 Nov 2010 08:58:26 +0000 (+0300) Subject: Staging: intel_sst: fix memory leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3251627c943f1cfc5bfad7c38d4e8d85cf44c6d8;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Acked-by: Harsha Priya Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/intel_sst/intel_sst_stream_encoded.c b/drivers/staging/intel_sst/intel_sst_stream_encoded.c index fbae39fda5c..5c455608b02 100644 --- a/drivers/staging/intel_sst/intel_sst_stream_encoded.c +++ b/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; }