Re: SDP comments

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

 



Hi,

On Tue, Apr 27, 2010, Santiago Carot Nemesio wrote:
> It may be interesting to take in mind that some functions in sdp_lib
> such as sdp_list_append or sdp_list_insert_sorted can return NULL if
> there isn't enought memory. Grepping the code i saw sentences like next:
> ...
> ap = sdp_list_append(ap, pds);
> ...
> I think that it can result in a memory leak when the asignation return
> NULL over a not empty list. What do you think?

You're right. However this seems more like a design issue with the
library than something that could be easily fixed. Either we'd have to
break the API or then go for the glib way of calling abort() on memory
allocation failures (which in a way would also be breaking the API).

Johan
--
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