Re: [patch] fix error freeing case
- From: Jody Goldberg <jody gnome org>
- To: Colin Walters <walters redhat com>
- Cc: gnome-print-list gnome org
- Subject: Re: [patch] fix error freeing case
- Date: Fri, 13 Aug 2004 15:25:10 -0400
On Fri, Jul 30, 2004 at 01:29:56PM -0400, Colin Walters wrote:
> Hi,
>
> This little patch should avoid possibly double-freeing a GError.
> diff -u /src/work/rpms/libgnomecups/libgnomecups-0.1.9/libgnomecups/gnome-cups-request.c /tmp/buffer-content-19353QJP
> --- libgnomecups-0.1.9/libgnomecups/gnome-cups-request.c~ 2004-07-29 13:53:18.862915872 -0400
> +++ libgnomecups-0.1.9/libgnomecups/gnome-cups-request.c 2004-07-29 13:53:29.574287496 -0400
> @@ -265,8 +266,6 @@
> gnome_cups_request_struct_free (GnomeCupsRequest *request)
> {
> g_free (request->path);
> - if (request->error && *request->error)
> - g_error_free (*request->error);
> g_free (request);
> }
This looks like the right thing, but The memory life cycle for these
requests is less than crystal clear. Could you throw in some
comments on which parts of the request should be freed by the hander
and which we handle ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]