[evolution-data-server] Add camel_store_summary_info_unref().



commit 16063388f63704603d3e28523d1ff4cdc1466b75
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Aug 16 09:19:16 2013 -0400

    Add camel_store_summary_info_unref().
    
    Replaces camel_store_summary_info_free(), although for the moment we'll
    retain an alias for backward-compatibility.
    
    Calling a function "free" when it actually only decrements a reference
    count is very misleading.

 camel/camel-imapx-server.c                      |    2 +-
 camel/camel-imapx-store-summary.c               |   12 ++--
 camel/camel-imapx-store.c                       |   20 +++---
 camel/camel-store-summary.c                     |   83 +++++++++++------------
 camel/camel-store-summary.h                     |    7 ++-
 camel/providers/nntp/camel-nntp-folder.c        |    2 +-
 camel/providers/nntp/camel-nntp-store-summary.c |   17 ++---
 camel/providers/nntp/camel-nntp-store.c         |   14 ++--
 camel/providers/nntp/camel-nntp-summary.c       |    2 +-
 docs/reference/camel/camel-sections.txt         |    1 +
 10 files changed, 80 insertions(+), 80 deletions(-)
---
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index b28625a..f02b9d8 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6604,7 +6604,7 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is,
                                        camel_store_summary_touch ((CamelStoreSummary *)((CamelIMAPXStore *) 
parent_store)->summary);
                                }
 
-                               camel_store_summary_info_free ((CamelStoreSummary *)((CamelIMAPXStore *) 
parent_store)->summary, si);
+                               camel_store_summary_info_unref ((CamelStoreSummary *)((CamelIMAPXStore *) 
parent_store)->summary, si);
                        }
                }
 
diff --git a/camel/camel-imapx-store-summary.c b/camel/camel-imapx-store-summary.c
index 598e1b2..a6da17b 100644
--- a/camel/camel-imapx-store-summary.c
+++ b/camel/camel-imapx-store-summary.c
@@ -116,7 +116,7 @@ camel_imapx_store_summary_new (void)
  *
  * Returns: The summary item, or NULL if the @full_name name
  * is not available.
- * It must be freed using camel_store_summary_info_free().
+ * It must be freed using camel_store_summary_info_unref().
  **/
 CamelIMAPXStoreInfo *
 camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s,
@@ -135,7 +135,7 @@ camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s,
                        if (strcmp (info->full_name, full_name) == 0 ||
                            (is_inbox && g_ascii_strcasecmp (info->full_name, full_name) == 0))
                                return info;
-                       camel_store_summary_info_free ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
+                       camel_store_summary_info_unref ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
                }
        }
 
@@ -189,7 +189,7 @@ camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s,
        /* path is already present, use the raw version we have */
        if (si && strlen (subpath) == strlen (path)) {
                f = g_strdup (camel_imapx_store_info_full_name (s, si));
-               camel_store_summary_info_free ((CamelStoreSummary *) s, si);
+               camel_store_summary_info_unref ((CamelStoreSummary *) s, si);
                return f;
        }
 
@@ -218,7 +218,7 @@ camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s,
        if (si) {
                full = g_strdup_printf ("%s%s", camel_imapx_store_info_full_name (s, si), f);
                g_free (f);
-               camel_store_summary_info_free ((CamelStoreSummary *) s, si);
+               camel_store_summary_info_unref ((CamelStoreSummary *) s, si);
                f = full;
        } else if (ns) {
                full = g_strdup_printf ("%s%s", ns->full_name, f);
@@ -250,7 +250,7 @@ camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s,
 
        info = camel_imapx_store_summary_full_name (s, full_name);
        if (info) {
-               camel_store_summary_info_free ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
+               camel_store_summary_info_unref ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
                d ("  already there\n");
                return info;
        }
@@ -567,7 +567,7 @@ store_info_load (CamelStoreSummary *s,
        mi = (CamelIMAPXStoreInfo *) store_summary_class->store_info_load (s, in);
        if (mi) {
                if (camel_file_util_decode_string (in, &mi->full_name) == -1) {
-                       camel_store_summary_info_free (s, (CamelStoreInfo *) mi);
+                       camel_store_summary_info_unref (s, (CamelStoreInfo *) mi);
                        mi = NULL;
                } else {
                        /* NB: this is done again for compatability */
diff --git a/camel/camel-imapx-store.c b/camel/camel-imapx-store.c
index 9656ac4..dac466f 100644
--- a/camel/camel-imapx-store.c
+++ b/camel/camel-imapx-store.c
@@ -539,7 +539,7 @@ get_folder_offline (CamelStore *store,
                g_free (folder_dir);
                g_free (base_dir);
 
-               camel_store_summary_info_free (summary, si);
+               camel_store_summary_info_unref (summary, si);
        } else {
                g_set_error (
                        error, CAMEL_STORE_ERROR,
@@ -694,7 +694,7 @@ imapx_unmark_folder_subscribed (CamelIMAPXStore *imapx_store,
                        camel_store_summary_touch (store_summary);
                        camel_store_summary_save (store_summary);
                }
-               camel_store_summary_info_free (store_summary, si);
+               camel_store_summary_info_unref (store_summary, si);
        }
 
        if (emit_signal) {
@@ -724,7 +724,7 @@ imapx_mark_folder_subscribed (CamelIMAPXStore *imapx_store,
                        camel_store_summary_touch (store_summary);
                        camel_store_summary_save (store_summary);
                }
-               camel_store_summary_info_free (store_summary, si);
+               camel_store_summary_info_unref (store_summary, si);
        }
 
        if (emit_signal) {
@@ -890,7 +890,7 @@ rename_folder_info (CamelIMAPXStore *imapx_store,
                        g_free (npath);
                }
 
-               camel_store_summary_info_free (
+               camel_store_summary_info_unref (
                        (CamelStoreSummary *) imapx_store->summary, si);
        }
 }
@@ -1010,7 +1010,7 @@ get_folder_info_offline (CamelStore *store,
 
                full_name = camel_imapx_store_info_full_name (imapx_store->summary, si);
                if (!full_name || !*full_name) {
-                       camel_store_summary_info_free ((CamelStoreSummary *) imapx_store->summary, si);
+                       camel_store_summary_info_unref ((CamelStoreSummary *) imapx_store->summary, si);
                        continue;
                }
 
@@ -1046,7 +1046,7 @@ get_folder_info_offline (CamelStore *store,
                                fi->flags |= CAMEL_FOLDER_NOCHILDREN;
                        g_ptr_array_add (folders, fi);
                }
-               camel_store_summary_info_free ((CamelStoreSummary *) imapx_store->summary, si);
+               camel_store_summary_info_unref ((CamelStoreSummary *) imapx_store->summary, si);
        }
        g_free (pattern);
 
@@ -1368,7 +1368,7 @@ sync_folders (CamelIMAPXStore *imapx_store,
                }
 
 endloop:
-               camel_store_summary_info_free (store_summary, si);
+               camel_store_summary_info_unref (store_summary, si);
        }
 
        g_hash_table_destroy (folders_from_server);
@@ -1426,7 +1426,7 @@ discover_inbox (CamelStore *store,
                                TRUE, cancellable, NULL);
 
                if (si)
-                       camel_store_summary_info_free (
+                       camel_store_summary_info_unref (
                                (CamelStoreSummary *) imapx_store->summary, si);
        }
 }
@@ -1790,7 +1790,7 @@ imapx_store_create_folder_sync (CamelStore *store,
        }
 
        if (si)
-               camel_store_summary_info_free (
+               camel_store_summary_info_unref (
                        (CamelStoreSummary *) imapx_store->summary, si);
 
        real_name = camel_imapx_store_summary_path_to_full (
@@ -2051,7 +2051,7 @@ imapx_store_folder_is_subscribed (CamelSubscribable *subscribable,
                (CamelStoreSummary *) imapx_store->summary, folder_name);
        if (si) {
                is_subscribed = (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
-               camel_store_summary_info_free (
+               camel_store_summary_info_unref (
                        (CamelStoreSummary *) imapx_store->summary, si);
        }
 
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index 1d68946..ff4fedd 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -179,7 +179,7 @@ store_summary_store_info_load (CamelStoreSummary *summary,
            camel_file_util_decode_uint32 (in, &info->flags) == -1 ||
            camel_file_util_decode_uint32 (in, &info->unread) == -1 ||
            camel_file_util_decode_uint32 (in, &info->total) == -1) {
-               camel_store_summary_info_free (summary, info);
+               camel_store_summary_info_unref (summary, info);
 
                return NULL;
        }
@@ -204,7 +204,7 @@ store_summary_store_info_load (CamelStoreSummary *summary,
        if (!ferror (in))
                return info;
 
-       camel_store_summary_info_free (summary, info);
+       camel_store_summary_info_unref (summary, info);
 
        return NULL;
 }
@@ -398,10 +398,8 @@ camel_store_summary_count (CamelStoreSummary *summary)
  *
  * Retrieve a summary item by index number.
  *
- * A referenced to the summary item is returned, which may be ref'd or
- * free'd as appropriate.
- *
- * It must be freed using camel_store_summary_info_free().
+ * The returned #CamelStoreInfo is referenced for thread-safety and should be
+ * unreferenced with camel_store_summary_info_unref() when finished with it.
  *
  * Returns: the summary item, or %NULL if @index is out of range
  **/
@@ -477,7 +475,7 @@ camel_store_summary_array_free (CamelStoreSummary *summary,
        g_return_if_fail (array != NULL);
 
        for (i = 0; i < array->len; i++)
-               camel_store_summary_info_free (summary, array->pdata[i]);
+               camel_store_summary_info_unref (summary, array->pdata[i]);
 
        g_ptr_array_free (array, TRUE);
 }
@@ -489,10 +487,8 @@ camel_store_summary_array_free (CamelStoreSummary *summary,
  *
  * Retrieve a summary item by path name.
  *
- * A referenced to the summary item is returned, which may be ref'd or
- * free'd as appropriate.
- *
- * It must be freed using camel_store_summary_info_free().
+ * The returned #CamelStoreInfo is referenced for thread-safety and should be
+ * unreferenced with camel_store_summary_info_unref() when finished with it.
  *
  * Returns: the summary item, or %NULL if the @path name is not
  * available
@@ -778,9 +774,8 @@ camel_store_summary_add_from_path (CamelStoreSummary *summary,
  *
  * Create a new info record from a name.
  *
- * This info record MUST be freed using
- * camel_store_summary_info_free(), camel_store_info_free() will not
- * work.
+ * Unreference the returned #CamelStoreInfo with
+ * camel_store_summary_info_unref() when finished with it.
  *
  * Returns: the #CamelStoreInfo associated with @path
  **/
@@ -799,15 +794,36 @@ camel_store_summary_info_new_from_path (CamelStoreSummary *summary,
 }
 
 /**
- * camel_store_summary_info_free:
+ * camel_store_summary_info_ref:
+ * @summary: a #CamelStoreSummary object
+ * @info: a #CamelStoreInfo
+ *
+ * Add an extra reference to @info.
+ *
+ * Returns: the @info argument
+ **/
+CamelStoreInfo *
+camel_store_summary_info_ref (CamelStoreSummary *summary,
+                              CamelStoreInfo *info)
+{
+       g_return_val_if_fail (info != NULL, NULL);
+       g_return_val_if_fail (info->refcount > 0, NULL);
+
+       g_atomic_int_inc (&info->refcount);
+
+       return info;
+}
+
+/**
+ * camel_store_summary_info_unref:
  * @summary: a #CamelStoreSummary object
  * @info: a #CamelStoreInfo
  *
  * Unref and potentially free @info, and all associated memory.
  **/
 void
-camel_store_summary_info_free (CamelStoreSummary *summary,
-                               CamelStoreInfo *info)
+camel_store_summary_info_unref (CamelStoreSummary *summary,
+                                CamelStoreInfo *info)
 {
        g_return_if_fail (CAMEL_IS_STORE_SUMMARY (summary));
        g_return_if_fail (info != NULL);
@@ -824,27 +840,6 @@ camel_store_summary_info_free (CamelStoreSummary *summary,
 }
 
 /**
- * camel_store_summary_info_ref:
- * @summary: a #CamelStoreSummary object
- * @info: a #CamelStoreInfo
- *
- * Add an extra reference to @info.
- *
- * Returns: the @info argument
- **/
-CamelStoreInfo *
-camel_store_summary_info_ref (CamelStoreSummary *summary,
-                              CamelStoreInfo *info)
-{
-       g_return_val_if_fail (info != NULL, NULL);
-       g_return_val_if_fail (info->refcount > 0, NULL);
-
-       g_atomic_int_inc (&info->refcount);
-
-       return info;
-}
-
-/**
  * camel_store_summary_touch:
  * @summary: a #CamelStoreSummary object
  *
@@ -881,7 +876,7 @@ camel_store_summary_clear (CamelStoreSummary *summary)
        }
 
        for (i = 0; i < summary->folders->len; i++)
-               camel_store_summary_info_free (summary, summary->folders->pdata[i]);
+               camel_store_summary_info_unref (summary, summary->folders->pdata[i]);
 
        g_ptr_array_set_size (summary->folders, 0);
        g_hash_table_destroy (summary->folders_path);
@@ -910,7 +905,7 @@ camel_store_summary_remove (CamelStoreSummary *summary,
        summary->flags |= CAMEL_STORE_SUMMARY_DIRTY;
        camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 
-       camel_store_summary_info_free (summary, info);
+       camel_store_summary_info_unref (summary, info);
 }
 
 /**
@@ -936,7 +931,7 @@ camel_store_summary_remove_path (CamelStoreSummary *summary,
                camel_store_summary_info_ref (summary, oldinfo);
                camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
                camel_store_summary_remove (summary, oldinfo);
-               camel_store_summary_info_free (summary, oldinfo);
+               camel_store_summary_info_unref (summary, oldinfo);
        } else {
                camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
        }
@@ -964,7 +959,7 @@ camel_store_summary_remove_index (CamelStoreSummary *summary,
                summary->flags |= CAMEL_STORE_SUMMARY_DIRTY;
 
                camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
-               camel_store_summary_info_free (summary, info);
+               camel_store_summary_info_unref (summary, info);
        } else {
                camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
        }
@@ -1170,7 +1165,7 @@ store_summary_sync_folder_summary_count_cb (CamelFolderSummary *folder_summary,
                g_warn_if_reached ();
        }
 
-       camel_store_summary_info_free (summary, si);
+       camel_store_summary_info_unref (summary, si);
 
        camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 }
@@ -1212,7 +1207,7 @@ camel_store_summary_connect_folder_summary (CamelStoreSummary *summary,
                return FALSE;
        }
 
-       camel_store_summary_info_free (summary, si);
+       camel_store_summary_info_unref (summary, si);
 
        if (g_hash_table_lookup (summary->priv->folder_summaries, folder_summary)) {
                camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
diff --git a/camel/camel-store-summary.h b/camel/camel-store-summary.h
index eb6da1f..e738e9d 100644
--- a/camel/camel-store-summary.h
+++ b/camel/camel-store-summary.h
@@ -181,9 +181,14 @@ CamelStoreInfo *
 CamelStoreInfo *
                camel_store_summary_info_ref    (CamelStoreSummary *summary,
                                                 CamelStoreInfo *info);
-void           camel_store_summary_info_free   (CamelStoreSummary *summary,
+void           camel_store_summary_info_unref  (CamelStoreSummary *summary,
                                                 CamelStoreInfo *info);
 
+/* Temporary backward-compatible alias. */
+#ifndef CAMEL_DISABLE_DEPRECATED
+#define camel_store_summary_info_free camel_store_summary_info_unref
+#endif /* CAMEL_DISABLE_DEPRECATED */
+
 /* removes a summary item */
 void           camel_store_summary_remove      (CamelStoreSummary *summary,
                                                 CamelStoreInfo *info);
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 081859e..17ea4ce 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -869,7 +869,7 @@ camel_nntp_folder_new (CamelStore *parent,
        if (si != NULL) {
                subscribed =
                        (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
-               camel_store_summary_info_free (
+               camel_store_summary_info_unref (
                        CAMEL_STORE_SUMMARY (nntp_store_summary), si);
        }
 
diff --git a/camel/providers/nntp/camel-nntp-store-summary.c b/camel/providers/nntp/camel-nntp-store-summary.c
index 4b64b01..388ab06 100644
--- a/camel/providers/nntp/camel-nntp-store-summary.c
+++ b/camel/providers/nntp/camel-nntp-store-summary.c
@@ -100,12 +100,11 @@ camel_nntp_store_summary_new (void)
  *
  * Retrieve a summary item by full name.
  *
- * A referenced to the summary item is returned, which may be
- * ref'd or free'd as appropriate.
+ * The returned #CamelNNTPStoreInfo is referenced for thread-safety and should
+ * be unreferenced with camel_store_summary_info_unref() when finished with it.
  *
  * Returns: The summary item, or NULL if the @full_name name
  * is not available.
- * It must be freed using camel_store_summary_info_free().
  **/
 CamelNNTPStoreInfo *
 camel_nntp_store_summary_full_name (CamelNNTPStoreSummary *s,
@@ -120,7 +119,7 @@ camel_nntp_store_summary_full_name (CamelNNTPStoreSummary *s,
                if (info) {
                        if (strcmp (info->full_name, full_name) == 0)
                                return info;
-                       camel_store_summary_info_free ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
+                       camel_store_summary_info_unref ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
                }
        }
 
@@ -192,7 +191,7 @@ camel_nntp_store_summary_path_to_full (CamelNNTPStoreSummary *s,
        /* path is already present, use the raw version we have */
        if (si && strlen (subpath) == strlen (path)) {
                f = g_strdup (camel_nntp_store_info_full_name (s, si));
-               camel_store_summary_info_free ((CamelStoreSummary *) s, si);
+               camel_store_summary_info_unref ((CamelStoreSummary *) s, si);
                return f;
        }
 
@@ -231,7 +230,7 @@ camel_nntp_store_summary_path_to_full (CamelNNTPStoreSummary *s,
        if (si) {
                full = g_strdup_printf ("%s%s", camel_nntp_store_info_full_name (s, si), f);
                g_free (f);
-               camel_store_summary_info_free ((CamelStoreSummary *) s, si);
+               camel_store_summary_info_unref ((CamelStoreSummary *) s, si);
                f = full;
        }
 
@@ -258,7 +257,7 @@ camel_nntp_store_summary_add_from_full (CamelNNTPStoreSummary *s,
 
        info = camel_nntp_store_summary_full_name (s, full_name);
        if (info) {
-               camel_store_summary_info_free ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
+               camel_store_summary_info_unref ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
                d (printf ("  already there\n"));
                return info;
        }
@@ -325,13 +324,13 @@ store_info_load (CamelStoreSummary *s,
        ni = (CamelNNTPStoreInfo *) CAMEL_STORE_SUMMARY_CLASS 
(camel_nntp_store_summary_parent_class)->store_info_load (s, in);
        if (ni) {
                if (camel_file_util_decode_string (in, &ni->full_name) == -1) {
-                       camel_store_summary_info_free (s, (CamelStoreInfo *) ni);
+                       camel_store_summary_info_unref (s, (CamelStoreInfo *) ni);
                        return NULL;
                }
                if (((CamelNNTPStoreSummary *) s)->version >= CAMEL_NNTP_STORE_SUMMARY_VERSION_1) {
                        if (camel_file_util_decode_uint32 (in, &ni->first) == -1
                            || camel_file_util_decode_uint32 (in, &ni->last) == -1) {
-                               camel_store_summary_info_free (s, (CamelStoreInfo *) ni);
+                               camel_store_summary_info_unref (s, (CamelStoreInfo *) ni);
                                return NULL;
                        }
                }
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index 6c05ed6..e9689bf 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -796,7 +796,7 @@ nntp_store_info_update (CamelNNTPStore *nntp_store,
        si->first = first;
 
        if (fsi != NULL)
-               camel_store_summary_info_free (store_summary, &fsi->info);
+               camel_store_summary_info_unref (store_summary, &fsi->info);
        else /* TODO see if we really did touch it */
                camel_store_summary_touch (store_summary);
 
@@ -883,7 +883,7 @@ nntp_store_get_subscribed_folder_info (CamelNNTPStore *nntp_store,
                                first = fi;
                        last = fi;
                }
-               camel_store_summary_info_free (store_summary, si);
+               camel_store_summary_info_unref (store_summary, si);
        }
 
        g_clear_object (&nntp_store_summary);
@@ -1084,11 +1084,11 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *nntp_store,
                        }
                } else if (subscribed_or_flag && first) {
                        /* we have already added subitems, but this item is no longer a subitem */
-                       camel_store_summary_info_free (store_summary, si);
+                       camel_store_summary_info_unref (store_summary, si);
                        break;
                }
 
-               camel_store_summary_info_free (store_summary, si);
+               camel_store_summary_info_unref (store_summary, si);
        }
 
        g_hash_table_destroy (known);
@@ -1544,7 +1544,7 @@ nntp_store_folder_is_subscribed (CamelSubscribable *subscribable,
 
        if (si != NULL) {
                truth = (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
-               camel_store_summary_info_free (store_summary, si);
+               camel_store_summary_info_unref (store_summary, si);
        }
 
        g_clear_object (&nntp_store_summary);
@@ -1611,7 +1611,7 @@ nntp_store_subscribe_folder_sync (CamelSubscribable *subscribable,
                        camel_folder_info_free (fi);
                }
 
-               camel_store_summary_info_free (store_summary, si);
+               camel_store_summary_info_unref (store_summary, si);
        }
 
        g_clear_object (&nntp_store_summary);
@@ -1674,7 +1674,7 @@ nntp_store_unsubscribe_folder_sync (CamelSubscribable *subscribable,
                        camel_folder_info_free (fi);
                }
 
-               camel_store_summary_info_free (store_summary, si);
+               camel_store_summary_info_unref (store_summary, si);
        }
 
        g_clear_object (&nntp_store_summary);
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
index d9b0732..63060d4 100644
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@ -568,7 +568,7 @@ update:
                        camel_store_summary_touch (store_summary);
                        camel_store_summary_save (store_summary);
                }
-               camel_store_summary_info_free (
+               camel_store_summary_info_unref (
                        store_summary, (CamelStoreInfo *) si);
 
        } else if (folder != NULL) {
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index ae52d5a..f79ceba 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -2594,6 +2594,7 @@ camel_store_summary_add_from_path
 camel_store_summary_info_new
 camel_store_summary_info_new_from_path
 camel_store_summary_info_ref
+camel_store_summary_info_unref
 camel_store_summary_info_free
 camel_store_summary_remove
 camel_store_summary_remove_path


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