Make this not leak.
authorDan Winship <danw@src.gnome.org>
Thu, 7 Sep 2000 21:00:56 +0000 (21:00 +0000)
committerDan Winship <danw@src.gnome.org>
Thu, 7 Sep 2000 21:00:56 +0000 (21:00 +0000)
* camel-session.c (camel_session_get_storage_path): Make this not
leak.

camel/ChangeLog
camel/camel-session.c

index e4b0ea1..7eb2fc4 100644 (file)
@@ -1,5 +1,10 @@
 2000-09-07  Dan Winship  <danw@helixcode.com>
 
+       * camel-session.c (camel_session_get_storage_path): Make this not
+       leak.
+       
+2000-09-07  Dan Winship  <danw@helixcode.com>
+
        * camel-session.c (camel_session_new): Make this take a path to a
        directory that Camel can use for its own nefarious purposes.
        (camel_session_get_storage_path): New function to return a path
index 81781fe..3e6630a 100644 (file)
@@ -347,8 +347,9 @@ camel_session_get_storage_path (CamelSession *session, CamelService *service,
 {
        char *path, *p;
 
-       path = g_strdup_printf ("%s/%s", session->storage_path,
-                               camel_service_get_path (service));
+       p = camel_service_get_path (service);
+       path = g_strdup_printf ("%s/%s", session->storage_path, p);
+       g_free (p);
 
        if (access (path, F_OK) == 0)
                return path;