From: Johan Hedberg <johan.hedberg@gmail.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCHes] osso-gwobex patches for review
Date: Tue, 23 Feb 2010 10:48:10 -0300 [thread overview]
Message-ID: <20100223134810.GA6157@jh-x301> (raw)
In-Reply-To: <1266762470.25029.2195.camel@localhost.localdomain>
Hi Bastien,
On Sun, Feb 21, 2010, Bastien Nocera wrote:
> The first patch fixes a few typos.
Yep, looks good and I've pushed it upstream.
> The second one requires the openobex patches I posted to the list, but
> should fail gracefully if the support does not exist.
This patch has some issues:
> + /* Setup low-level USB */
> + if (!gw_obex_transport_setup_usb(&handle)) {
> + debug("gw_obex_transport_setup_usb() failed, no USB support?\n");
> + return NULL;
> + }
You forget to set *error before returning NULL here.
> + /* Do the transport connection */
> + if (OBEX_InterfaceConnect(handle, iface) < 0) {
> + debug("Could not connect to USB device '%s'\n", dev);
> + if (error)
> + *error = GW_OBEX_ERROR_NO_SERVICE;
> + return NULL;
> + }
This looks like a memory leak since you don't do the same cleanup of ctx->mutex
and ctx as you do in the other failure cases. Maybe the function could use a
"fail" label where you jump to for cleanup tasks?
Besides those issues the patch seems ok'ish.
Johan
next prev parent reply other threads:[~2010-02-23 13:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-21 14:27 [PATCHes] osso-gwobex patches for review Bastien Nocera
2010-02-23 13:48 ` Johan Hedberg [this message]
2010-03-05 17:15 ` Bastien Nocera
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=20100223134810.GA6157@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=hadess@hadess.net \
--cc=linux-bluetooth@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).