[ofa-general] RE: possible memory leak introduced by commit 110cf374a809817d5c080c0ac82d65d029820a66 (Roland's tree)

Hefty, Sean sean.hefty at intel.com
Sun Aug 10 22:31:36 PDT 2008


>Now, no one seems responsible for freeing the memory allocated by
>kzalloc in procedure cm_add_one (file drivers/infiniband/core/cm.c):
>
>   /**** jpm: Who deallocates this kzalloc when the cm device is removed??? */
>        cm_dev = kzalloc(sizeof(*cm_dev) + sizeof(*port) *
>                         ib_device->phys_port_cnt, GFP_KERNEL);
>        if (!cm_dev)
>               return;
>
>        cm_dev->ib_device = ib_device;
>        cm_get_ack_delay(cm_dev);
>
>        cm_dev->device = device_create_drvdata(&cm_class, &ib_device->dev,
>                                               MKDEV(0, 0), NULL,
>                                               "%s", ib_device->name);
>
>Am I correct?

It looks like it.  I will check into this more on Monday.  Thanks.

- Sean

(Sorry if this breaks the thread.)



More information about the general mailing list