Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Santiago Carot Nemesio <scarot@libresoft.es>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: SDP comments
Date: Tue, 27 Apr 2010 18:07:10 +0300	[thread overview]
Message-ID: <20100427150710.GB11895@jh-x301> (raw)
In-Reply-To: <1272376267.2157.29.camel@mosquito>

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

  reply	other threads:[~2010-04-27 15:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 13:34 [PATCH 1/3] SDP Santiago Carot Nemesio
2010-04-27 13:37 ` [PATCH 2/3] SDP Santiago Carot Nemesio
2010-04-27 13:39   ` [PATCH 3/3] SDP Santiago Carot Nemesio
2010-04-27 13:51     ` SDP comments Santiago Carot Nemesio
2010-04-27 15:07       ` Johan Hedberg [this message]
2010-04-27 15:05     ` [PATCH 3/3] SDP Johan Hedberg
2010-04-27 15:50       ` Marcel Holtmann
2010-04-27 15:59       ` Santiago Carot Nemesio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100427150710.GB11895@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=scarot@libresoft.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox