Re: [PATCH obexd v3 2/6] client: fix unreported error case

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

 



Hi Mikel,

On Thu, Feb 16, 2012, Mikel Astiz wrote:
> @@ -735,17 +735,31 @@ static void session_process_queue(struct obc_session *session)
>  	if (session->queue == NULL || g_queue_is_empty(session->queue))
>  		return;
>  
> +	obc_session_ref(session);
> +
>  	while ((p = g_queue_pop_head(session->queue))) {
>  		int err;
>  
>  		err = pending_request_auth(p);
>  		if (err == 0) {
>  			session->p = p;
> +			obc_session_unref(session);
>  			return;
>  		}

Instead of adding the unref to any place you return in the loop, it'd be
simpler to just do a break; since you've already got the necessary unref
and end of the function right after the loop.

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