All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: dgnc: free memory allocated
@ 2015-06-18 13:27 Gujulan Elango, Hari Prasath (H.)
  2015-06-22 17:15 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Gujulan Elango, Hari Prasath (H.) @ 2015-06-18 13:27 UTC (permalink / raw)
  To: gregkh
  Cc: lidza.louina, devel, driverdev-devel, Gujulan Elango, Hari Prasath (H.)

From: Hari Prasath Gujulan Elango <hgujulan@visteon.com>

The memory allocated in dgnc_tty_register() for two objects is not freed
anywhere.This patch addresses this by freeing the memory in
dgnc_tty_uninit.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
---
 drivers/staging/dgnc/dgnc_tty.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 5c5c4b7..fbfe79a 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -422,8 +422,12 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
 
 	kfree(brd->SerialDriver.ttys);
 	brd->SerialDriver.ttys = NULL;
+	kfree(brd->SerialDriver.termios);
+	brd->SerialDriver.termios = NULL;
 	kfree(brd->PrintDriver.ttys);
 	brd->PrintDriver.ttys = NULL;
+	kfree(brd->PrintDriver.termios);
+	brd->PrintDriver.termios = NULL;
 }
 
 /*=======================================================================
-- 
1.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: dgnc: free memory allocated
  2015-06-18 13:27 [PATCH] staging: dgnc: free memory allocated Gujulan Elango, Hari Prasath (H.)
@ 2015-06-22 17:15 ` Dan Carpenter
  2015-06-23 12:35   ` Gujulan Elango, Hari Prasath (H.)
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2015-06-22 17:15 UTC (permalink / raw)
  To: Gujulan Elango, Hari Prasath (H.)
  Cc: gregkh, lidza.louina, devel, driverdev-devel, Mark Hounschell

You should have CC'd Mark on these.  Use ./scripts/get_maintainer.pl

regards,
dan carpenter

On Thu, Jun 18, 2015 at 01:27:28PM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> From: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
> 
> The memory allocated in dgnc_tty_register() for two objects is not freed
> anywhere.This patch addresses this by freeing the memory in
> dgnc_tty_uninit.
> 
> Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
> ---
>  drivers/staging/dgnc/dgnc_tty.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
> index 5c5c4b7..fbfe79a 100644
> --- a/drivers/staging/dgnc/dgnc_tty.c
> +++ b/drivers/staging/dgnc/dgnc_tty.c
> @@ -422,8 +422,12 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
>  
>  	kfree(brd->SerialDriver.ttys);
>  	brd->SerialDriver.ttys = NULL;
> +	kfree(brd->SerialDriver.termios);
> +	brd->SerialDriver.termios = NULL;
>  	kfree(brd->PrintDriver.ttys);
>  	brd->PrintDriver.ttys = NULL;
> +	kfree(brd->PrintDriver.termios);
> +	brd->PrintDriver.termios = NULL;
>  }
>  
>  /*=======================================================================
> -- 
> 1.9.1
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: dgnc: free memory allocated
  2015-06-22 17:15 ` Dan Carpenter
@ 2015-06-23 12:35   ` Gujulan Elango, Hari Prasath (H.)
  0 siblings, 0 replies; 3+ messages in thread
From: Gujulan Elango, Hari Prasath (H.) @ 2015-06-23 12:35 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: devel, gregkh, driverdev-devel, lidza.louina



On Monday 22 June 2015 10:45 PM, Dan Carpenter wrote:
> You should have CC'd Mark on these.  Use ./scripts/get_maintainer.pl
> 
> regards,
> dan carpenter
> 

Thanks Dan.I did use the get_maintainer.pl as I do always. I missed
Marks email ID. It was my mistake.Thanks for adding him.Greg has already
added this patch.I will ensure not to miss him next time.

> On Thu, Jun 18, 2015 at 01:27:28PM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
>> From: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
>>
>> The memory allocated in dgnc_tty_register() for two objects is not freed
>> anywhere.This patch addresses this by freeing the memory in
>> dgnc_tty_uninit.
>>
>> Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
>> ---
>>  drivers/staging/dgnc/dgnc_tty.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
>> index 5c5c4b7..fbfe79a 100644
>> --- a/drivers/staging/dgnc/dgnc_tty.c
>> +++ b/drivers/staging/dgnc/dgnc_tty.c
>> @@ -422,8 +422,12 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
>>  
>>  	kfree(brd->SerialDriver.ttys);
>>  	brd->SerialDriver.ttys = NULL;
>> +	kfree(brd->SerialDriver.termios);
>> +	brd->SerialDriver.termios = NULL;
>>  	kfree(brd->PrintDriver.ttys);
>>  	brd->PrintDriver.ttys = NULL;
>> +	kfree(brd->PrintDriver.termios);
>> +	brd->PrintDriver.termios = NULL;
>>  }
>>  
>>  /*=======================================================================
>> -- 
>> 1.9.1
>> _______________________________________________
>> devel mailing list
>> devel@linuxdriverproject.org
>> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
> 


-- 
thanks & regards,
Hari Prasath
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2015-06-23 12:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 13:27 [PATCH] staging: dgnc: free memory allocated Gujulan Elango, Hari Prasath (H.)
2015-06-22 17:15 ` Dan Carpenter
2015-06-23 12:35   ` Gujulan Elango, Hari Prasath (H.)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.