[haiku-commits] Re: r37324 - haiku/trunk/src/add-ons/kernel/drivers/bus/usb

  • From: "Ithamar R. Adema" <ithamar.adema@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 01 Jul 2010 13:02:30 +0100

On Thu, 2010-07-01 at 13:56 +0200, wpjvandermeer@xxxxxxxxx wrote:
> -     gDeviceNames[index++] = DEVICE_NAME;
> +     gDeviceNames[index++] = strdup(DEVICE_NAME);

You're leaking here. If you want to fix it this way, you need to make
sure the for() loop starts freeing at 0, and not at 1.

HTH,

Ithamar.



Other related posts: