* [patch] Staging: intel_sst: fix memory leak
@ 2010-11-13 8:58 Dan Carpenter
2010-11-15 5:47 ` Harsha, Priya
2010-11-16 13:38 ` Alan Cox
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2010-11-13 8:58 UTC (permalink / raw)
To: kernel-janitors
The original code set "str_info->decode_ibuf" to NULL so the kfree() is
no-op.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This is a static checker thing. I don't have the hardware to test this
myself so please check it carefully.
diff --git a/drivers/staging/intel_sst/intel_sst_stream_encoded.c b/drivers/staging/intel_sst/intel_sst_stream_encoded.c
index d4e94f1..09993d6 100644
--- a/drivers/staging/intel_sst/intel_sst_stream_encoded.c
+++ b/drivers/staging/intel_sst/intel_sst_stream_encoded.c
@@ -1270,7 +1270,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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [patch] Staging: intel_sst: fix memory leak
2010-11-13 8:58 [patch] Staging: intel_sst: fix memory leak Dan Carpenter
@ 2010-11-15 5:47 ` Harsha, Priya
2010-11-16 13:38 ` Alan Cox
1 sibling, 0 replies; 3+ messages in thread
From: Harsha, Priya @ 2010-11-15 5:47 UTC (permalink / raw)
To: kernel-janitors
> -----Original Message-----
> From: Dan Carpenter [mailto:error27@gmail.com]
> Sent: Saturday, November 13, 2010 2:28 PM
> To: Greg Kroah-Hartman
> Cc: Harsha, Priya; Koul, Vinod; Alan Cox; devel@driverdev.osuosl.org;
> kernel-janitors@vger.kernel.org
> Subject: [patch] 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>
> ---
> This is a static checker thing. I don't have the hardware to test this
> myself so please check it carefully.
>
> diff --git a/drivers/staging/intel_sst/intel_sst_stream_encoded.c
> b/drivers/staging/intel_sst/intel_sst_stream_encoded.c
> index d4e94f1..09993d6 100644
> --- a/drivers/staging/intel_sst/intel_sst_stream_encoded.c
> +++ b/drivers/staging/intel_sst/intel_sst_stream_encoded.c
> @@ -1270,7 +1270,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;
> }
Acked-by: Harsha Priya <priya.harsha@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Staging: intel_sst: fix memory leak
2010-11-13 8:58 [patch] Staging: intel_sst: fix memory leak Dan Carpenter
2010-11-15 5:47 ` Harsha, Priya
@ 2010-11-16 13:38 ` Alan Cox
1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2010-11-16 13:38 UTC (permalink / raw)
To: kernel-janitors
On Sat, 13 Nov 2010 11:58:26 +0300
Dan Carpenter <error27@gmail.com> wrote:
> The original code set "str_info->decode_ibuf" to NULL so the kfree()
> is no-op.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> This is a static checker thing. I don't have the hardware to test
> this myself so please check it carefully.
Acked-by: Alan Cox <alan@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-16 13:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-13 8:58 [patch] Staging: intel_sst: fix memory leak Dan Carpenter
2010-11-15 5:47 ` Harsha, Priya
2010-11-16 13:38 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox