Skip to contentSkip to conversation

bad kfree(id) ?

PATCH In review Randy.Dunlap 2 participants 3 messages Feb 27, 2006 – Feb 28, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I'm using 2.6.16-rc4-mm2.

A the end of function ata_dev_read_id(), in the error case, under err_out:, it does

	kfree(id);

but this was not dynamically allocated.

Is this a git-to-mm merge error or something that was missed since it's on an error path?

thanks,

Signature · 1 line
~Randy
#1 lore raw

PATCH 1/1 libata: kill illegal kfree(id)

Kill kfree(id) in failure path of ata_dev_read_id(). id is not dynamically allocated yet.

Cc Randy Dunlap <[email protected]>

---

That was a leftover from patch reordering.

Jeff, I'll regenerate patches #3-6 of reorganize ata_dev_identify() patchset ASAP. So, at the moment, there's no pending patch waiting for your review.

Sorry.

drivers/scsi/libata-core.c +0 -1
Index: work/drivers/scsi/libata-core.c
===================================================================
@@ -1036,7 +1036,6 @@ static int ata_dev_read_id(struct ata_po
  err_out:
 	printk(KERN_WARNING "ata%u: dev %u failed to IDENTIFY (%s)\n",
 	       ap->id, dev->devno, reason);
-	kfree(id);
 	return rc;
 }
 
author Acked-by on v1 1/1
#2 lore raw

Re: [PATCH] libata: kill illegal kfree(id)

Quoted 5 lines · Tejun Heo

Kill kfree(id) in failure path of ata_dev_read_id(). id is not dynamically allocated yet.

Cc Randy Dunlap <[email protected]>

matches my patch.

Quoted 27 lines

---

That was a leftover from patch reordering.

Jeff, I'll regenerate patches #3-6 of reorganize ata_dev_identify() patchset ASAP. So, at the moment, there's no pending patch waiting for your review.

Sorry.

Index: work/drivers/scsi/libata-core.c
===================================================================

drivers/scsi/libata-core.c +0 -2
@@ -1036,7 +1036,6 @@ static int ata_dev_read_id(struct ata_po
  err_out:
 	printk(KERN_WARNING "ata%u: dev %u failed to IDENTIFY (%s)\n",
 	       ap->id, dev->devno, reason);
-	kfree(id);
 	return rc;
 }
 
-

To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
~Randy