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

memory leak in testgtk



Hello

I think I found small bug in testgtk:

--- cut ---
  g_print ("%s\n", gtk_font_selection_dialog_get_font_name (fs));
--- cut ---

gtk_font_selection_get_font_name returns pointer, and caller of the function 
must free the memory this pointer address. My code:

  gchar* tmp = gtk_font_selection_dialog_get_font_name(fs);
  g_print("%s\n",tmp);
  g_free(tmp);

Right?

I also found three other fuctions in gtk which returns the pointer (gchar*)
to memory that caller must free.

-- 
Andrew Klochkov



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