Re: [gnome-db] Re: gda-postgres: updatable data models
- From: Gonzalo Paniagua Javier <gonzalo gnome-db org>
- To: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Re: gda-postgres: updatable data models
- Date: Tue, 28 Oct 2003 08:29:25 -0800
El lun, 27-10-2003 a las 10:04, Laurent Sansonetti escribió:
> On Mon, 2003-10-27 at 14:38, Gonzalo Paniagua Javier wrote:
> > El sáb, 25-10-2003 a las 07:48, Laurent Sansonetti escribió:
> > > I just realized that the previous patch was not in unified format :)
> > +               const gchar *newval = gda_value_stringify (gda_row_get_value ((GdaRow *) row, colnum));
> > 
> > You have to g_free that one after using it.
> > 
> 
> True.
> 
> > 
> > +               /* build the update command */
> > +               query = g_strdup_printf ("UPDATE %s ", priv_data->table_name);
> > 
> > You will leak that one.
> > 
> I don't get this one.  I g_free (query) a few lines after that.
+               /* build the update command */
+               query = g_strdup_printf ("UPDATE %s ", priv_data->table_name);
+               query = g_strconcat (query, query_set, query_where, NULL);
The one you g_free is the second one. The g_strdup_printf allocated one
is never freed.
-Gonzalo
-- 
Gonzalo Paniagua Javier <gonzalo gnome-db org>
http://www.gnome-db.org/~gonzalo/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]