Re: QuiC AMP development

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

 



Hi Sober,

Be careful not to top-post on this mailing list.

> Hi Shaffer/Peter
>
> static inline int send_a2mp_cmd(struct amp_mgr *mgr, u8 ident, u8
> code, u16 len, void *data) {
> 	struct a2mp_cmd_hdr *hdr;
> 	int plen;
> 	u8 *buf;
>
> 	BT_DBG("ident %d code %d", ident, code);
> 	plen = sizeof(*hdr) + len;
> 	buf = kzalloc(plen, GFP_ATOMIC);
> 	if (!buf)
> 		return -ENOMEM;
> 	hdr = (struct a2mp_cmd_hdr *) buf;
> 	hdr->code  = code;
> 	hdr->ident = ident;
> 	hdr->len   = cpu_to_le16(len);
> 	buf += sizeof(*hdr);
> 	memcpy(buf, data, len);
> 	return send_a2mp(mgr->a2mp_sock, (u8 *) hdr, plen);
> }
>
> I see that here have a malloc, but i don't see free, doesn't it cause
> memleak?
>

Looks like it, thanks. As Mat and I explained to Kevin and Dan at the
mini-summit the git repo we posted is a snapshot of our development tree,
and was provided so interested parties could review our approach. As we
post patches to the mailing list your review will be much appreciated.

> Regards
> sober
>
>

>>> >
>>> >* Ron Shaffer <rshaffer@xxxxxxxxxxxxxx> [2010-08-08 21:43:36 -0500]:
>>> >
>>> >>As requested in today's summit discussions, here's a link that can be
>>> >>used to inspect the code we've done to add AMP support on the latest
>>> >>next tree.
>>> >>
>>> >>https://www.codeaurora.org/gitweb/quic/bluetooth/?p=bluetooth-next-2.6.git;a=summary
>>> >>branch pk-upstream
>>> >
>>> >


Peter.

-- 

Peter Krystad

Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum


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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux