Fun with purify.
authorDan Winship <danw@src.gnome.org>
Fri, 2 Jun 2000 06:34:58 +0000 (06:34 +0000)
committerDan Winship <danw@src.gnome.org>
Fri, 2 Jun 2000 06:34:58 +0000 (06:34 +0000)
* providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
success as well as failure.
(camel_pop3_command_get_additional_data): free buf after reading
the last line (".").

* providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
body data after creating the memstream from it (which will copy
the data).

* providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
and index paths.

* camel-data-wrapper.c (finalize): unref the stream, if it exists.

camel/ChangeLog
camel/camel-data-wrapper.c
camel/providers/mbox/camel-mbox-folder.c
camel/providers/pop3/camel-pop3-folder.c
camel/providers/pop3/camel-pop3-store.c

index 5395348..f643a09 100644 (file)
@@ -1,3 +1,21 @@
+2000-06-02  Dan Winship  <danw@helixcode.com>
+
+       Fun with purify.
+
+       * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
+       success as well as failure.
+       (camel_pop3_command_get_additional_data): free buf after reading
+       the last line (".").
+
+       * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
+       body data after creating the memstream from it (which will copy
+       the data).
+
+       * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
+       and index paths.
+
+       * camel-data-wrapper.c (finalize): unref the stream, if it exists.
+
 2000-06-01  Not Zed  <NotZed@HelixCode.com>
 
        * camel-mime-part.c (construct_from_parser): For a message part,
index 86be811..94c222e 100644 (file)
@@ -108,6 +108,9 @@ finalize (GtkObject *object)
        if (camel_data_wrapper->mime_type)
                gmime_content_field_unref (camel_data_wrapper->mime_type);
 
+       if (camel_data_wrapper->stream)
+               gtk_object_unref (GTK_OBJECT (camel_data_wrapper->stream));
+
        GTK_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
index c663824..56af83a 100644 (file)
@@ -131,7 +131,9 @@ mbox_finalize (GtkObject *object)
        CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (object);
 
        g_free (mbox_folder->folder_file_path);
+       g_free (mbox_folder->summary_file_path);
        g_free (mbox_folder->folder_dir_path);
+       g_free (mbox_folder->index_file_path);
 
        GTK_OBJECT_CLASS (parent_class)->finalize (object);
 }
index 45687e4..396bbc0 100644 (file)
@@ -198,6 +198,7 @@ get_message_by_uid (CamelFolder *folder, const char *uid, CamelException *ex)
        }
 
        msgstream = camel_stream_mem_new_with_buffer (body, strlen (body));
+       g_free (body);
        msg = camel_mime_message_new ();
        camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
                                                  msgstream);
index 4b4a4ac..813ab6e 100644 (file)
@@ -418,6 +418,7 @@ pop3_connect (CamelService *service, CamelException *ex)
                        g_free (msg);
                        pop3_disconnect (service, ex);
                }
+               g_free (msg);
 
                status = camel_pop3_command (store, &msg, "PASS %s",
                                             service->url->passwd);
@@ -453,6 +454,7 @@ pop3_connect (CamelService *service, CamelException *ex)
                pop3_disconnect (service, ex);
                return FALSE;
        }
+       g_free (msg);
 
        service_class->connect (service, ex);
        return TRUE;
@@ -613,6 +615,7 @@ camel_pop3_command_get_additional_data (CamelPop3Store *store,
                        memmove (buf, buf + 1, strlen (buf));
                g_ptr_array_add (data, buf);
        }
+       g_free (buf);
 
        if (status == CAMEL_POP3_OK) {
                /* Append an empty string to the end of the array