Re: [gnome-db] [PATCH] Another memory leak
- From: Phil Longstaff <plongstaff rogers com>
- To: Andrea Zagli <azagli inwind it>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] [PATCH] Another memory leak
- Date: Wed, 02 Apr 2008 09:42:37 -0400
Andrea Zagli wrote:
> Il giorno lun, 31/03/2008 alle 07.57 +0200, Vivien Malerba ha scritto:
>> [...]
>
> should not be instead a simple
>
>>> + g_free (filename);
>
> at the end?
>
> if not, sorry for my inexperience ;-)
That would also work. However, rather than duplicate the string and
immediately free filename, why not just keep and use filename. It saves
the cost of the malloc, copy and free.
Phil
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]