Re: [PATCHv4 10/12] obexd: Fix memory leak

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

 



Hi Andrei,

On Tue, Jul 29, 2014, Andrei Emeltchenko wrote:
> Fixes memory leak for folder_listing_cb().
> ---
>  obexd/client/map.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/obexd/client/map.c b/obexd/client/map.c
> index d2d3d81..331aebc 100644
> --- a/obexd/client/map.c
> +++ b/obexd/client/map.c
> @@ -271,8 +271,10 @@ static void folder_listing_cb(struct obc_session *session,
>  	}
>  
>  	reply = dbus_message_new_method_return(request->msg);
> -	if (reply == NULL)
> +	if (reply == NULL) {
> +		g_free(contents);
>  		return;
> +	}

Shouldn't you call pending_requesT_free(request) before returning?

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