All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IIO-onwards: trigger: iio-trig-sysfs: Avoid double free.
@ 2011-04-15 12:29 michael.hennerich
  2011-04-15 12:53 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: michael.hennerich @ 2011-04-15 12:29 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio, drivers, device-drivers-devel, Michael Hennerich

From: Michael Hennerich <michael.hennerich@analog.com>


Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/staging/iio/trigger/iio-trig-sysfs.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/iio/trigger/iio-trig-sysfs.c b/drivers/staging/iio/trigger/iio-trig-sysfs.c
index 5cd55ac..6d3dee3 100644
--- a/drivers/staging/iio/trigger/iio-trig-sysfs.c
+++ b/drivers/staging/iio/trigger/iio-trig-sysfs.c
@@ -134,7 +134,6 @@ static int iio_sysfs_trigger_probe(int id)
 	t->id = id;
 	t->trig = iio_allocate_trigger_named(name);
 	if (!t->trig) {
-		kfree(name);
 		ret = -ENOMEM;
 		goto free_t;
 	}
-- 
1.6.0.2

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

* Re: [PATCH] IIO-onwards: trigger: iio-trig-sysfs: Avoid double free.
  2011-04-15 12:29 [PATCH] IIO-onwards: trigger: iio-trig-sysfs: Avoid double free michael.hennerich
@ 2011-04-15 12:53 ` Jonathan Cameron
  2011-04-15 13:00   ` Hennerich, Michael
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2011-04-15 12:53 UTC (permalink / raw)
  To: michael.hennerich; +Cc: linux-iio, drivers, device-drivers-devel

On 04/15/11 13:29, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
> 
> 
Good catch.

Given I haven't 'officially' posted this lot yet, do you mind
if I merge the fixes into the patch that caused the problem?
(with crediting of course!)

Could keep them separate but that will make for confusing reviewing
once I haven't posted the patches.. (probably later today).

> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
>  drivers/staging/iio/trigger/iio-trig-sysfs.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/iio/trigger/iio-trig-sysfs.c b/drivers/staging/iio/trigger/iio-trig-sysfs.c
> index 5cd55ac..6d3dee3 100644
> --- a/drivers/staging/iio/trigger/iio-trig-sysfs.c
> +++ b/drivers/staging/iio/trigger/iio-trig-sysfs.c
> @@ -134,7 +134,6 @@ static int iio_sysfs_trigger_probe(int id)
>  	t->id = id;
>  	t->trig = iio_allocate_trigger_named(name);
>  	if (!t->trig) {
> -		kfree(name);
>  		ret = -ENOMEM;
>  		goto free_t;
>  	}


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

* RE: [PATCH] IIO-onwards: trigger: iio-trig-sysfs: Avoid double free.
  2011-04-15 12:53 ` Jonathan Cameron
@ 2011-04-15 13:00   ` Hennerich, Michael
  0 siblings, 0 replies; 3+ messages in thread
From: Hennerich, Michael @ 2011-04-15 13:00 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Drivers, device-drivers-devel

Jonathan Cameron wrote on 2011-04-15:
> On 04/15/11 13:29, michael.hennerich@analog.com wrote:
>> From: Michael Hennerich <michael.hennerich@analog.com>
>>
>>
> Good catch.
>
> Given I haven't 'officially' posted this lot yet, do you mind if I
> merge the fixes into the patch that caused the problem?
> (with crediting of course!)

No Problem - keep it simple.

> Could keep them separate but that will make for confusing reviewing
> once I haven't posted the patches.. (probably later today).
>
>> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
>> ---
>>  drivers/staging/iio/trigger/iio-trig-sysfs.c |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>> diff --git a/drivers/staging/iio/trigger/iio-trig-sysfs.c
>> b/drivers/staging/iio/trigger/iio-trig-sysfs.c
>> index 5cd55ac..6d3dee3 100644
>> --- a/drivers/staging/iio/trigger/iio-trig-sysfs.c
>> +++ b/drivers/staging/iio/trigger/iio-trig-sysfs.c
>> @@ -134,7 +134,6 @@ static int iio_sysfs_trigger_probe(int id)
>>      t->id =3D id;     t->trig =3D iio_allocate_trigger_named(name);    =
 if
>>  (!t->trig) { -              kfree(name);            ret =3D -ENOMEM;   =
       goto free_t;    }

Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Gesch=
aeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret=
 Seif

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

end of thread, other threads:[~2011-04-15 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-15 12:29 [PATCH] IIO-onwards: trigger: iio-trig-sysfs: Avoid double free michael.hennerich
2011-04-15 12:53 ` Jonathan Cameron
2011-04-15 13:00   ` Hennerich, Michael

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.