Search Linux Wireless

Re: [PATCH 1/3] mwl8k: Adding support to access BBP registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jonas,

On Wed, Feb 19, 2014 at 04:12:56AM -0800, Jonas Gorski wrote:
> > +       cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
> > +       if (cmd == NULL)
> > +               return -ENOMEM;
> > +
> > +       cmd->header.code = cpu_to_le16(MWL8K_CMD_BBP_REG_ACCESS);
> > +       cmd->header.length = cpu_to_le16(sizeof(*cmd));
> > +       cmd->action = cpu_to_le16(action);
> > +       cmd->offset = cpu_to_le16(offset);
> > +
> > +       rc = mwl8k_post_cmd(hw, &cmd->header);
> > +
> > +       if (!rc)
> > +               *value = cmd->value;
> > +       else
> > +               *value = 0;
> > +
> > +       return rc;
> 
> You don't free the allocated cmd anywhere, so you are leaking memory
> on every call.

We will fix this in V2.

Thanks
Yogesh

> 
> 
> Regards
> Jonas
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux