linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: Free the right keymap
@ 2010-03-20  4:40 Yong Wang
  2010-03-20  6:00 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Yong Wang @ 2010-03-20  4:40 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Matthew Garrett, linux-input

map is allocated in sparse_keymap_setup() and it should be freed
instead of keymap.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
---
 drivers/input/sparse-keymap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c
index e6bde55..f64e004 100644
--- a/drivers/input/sparse-keymap.c
+++ b/drivers/input/sparse-keymap.c
@@ -163,7 +163,7 @@ int sparse_keymap_setup(struct input_dev *dev,
 	return 0;
 
  err_out:
-	kfree(keymap);
+	kfree(map);
 	return error;
 
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: Free the right keymap
  2010-03-20  4:40 [PATCH] Input: Free the right keymap Yong Wang
@ 2010-03-20  6:00 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2010-03-20  6:00 UTC (permalink / raw)
  To: Yong Wang; +Cc: Matthew Garrett, linux-input

On Sat, Mar 20, 2010 at 12:40:16PM +0800, Yong Wang wrote:
> map is allocated in sparse_keymap_setup() and it should be freed
> instead of keymap.
> 

Indeed, thank you Yung.

> Signed-off-by: Yong Wang <yong.y.wang@intel.com>
> ---
>  drivers/input/sparse-keymap.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c
> index e6bde55..f64e004 100644
> --- a/drivers/input/sparse-keymap.c
> +++ b/drivers/input/sparse-keymap.c
> @@ -163,7 +163,7 @@ int sparse_keymap_setup(struct input_dev *dev,
>  	return 0;
>  
>   err_out:
> -	kfree(keymap);
> +	kfree(map);
>  	return error;
>  
>  }

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-20  6:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20  4:40 [PATCH] Input: Free the right keymap Yong Wang
2010-03-20  6:00 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).