commit cef3c1ee550103651e973ac537fdf5f86471ace4
Author: Christophe Fergeau <cferg...@mandriva.com>
Date:   Sun Aug 29 17:27:44 2010 +0200

    don't try to free non-malloc'ed memory
    
    get_data_dir return a filename from gtkpod global state, we really
    don't want to free the returned string (was crashing here). Duplicate
    the string instead so that we can use the same code path as when
    g_build_filename is used.

 src/gtkpod.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gtkpod.c b/src/gtkpod.c
index 24a6241..726d852 100644
--- a/src/gtkpod.c
+++ b/src/gtkpod.c
@@ -163,7 +163,7 @@ void gtkpod_init(int argc, char *argv[]) {
     /* Load layout.*/
     session_dir = g_build_filename(g_get_home_dir(), ".gtkpod", "session", 
NULL);
     if (! g_file_test(session_dir, G_FILE_TEST_IS_DIR))
-        session_dir = get_data_dir();
+        session_dir = g_strdup(get_data_dir());
 
     /* Restore session */
     anjuta_shell_session_load(ANJUTA_SHELL (app), session_dir, NULL);

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to