Avoid possible GError memory leak
authorMilan Crha <mcrha@redhat.com>
Wed, 6 Jun 2012 09:16:21 +0000 (11:16 +0200)
committerMilan Crha <mcrha@redhat.com>
Wed, 6 Jun 2012 09:16:21 +0000 (11:16 +0200)
camel/camel-folder-summary.c

index 67a2e0b..b8daf18 100644 (file)
@@ -2340,7 +2340,9 @@ camel_folder_summary_load_from_db (CamelFolderSummary *summary,
                summary->priv->uids, &local_error);
 
        if (local_error != NULL && local_error->message != NULL &&
-               strstr (local_error->message, "no such table") != NULL) {
+           strstr (local_error->message, "no such table") != NULL) {
+               g_clear_error (&local_error);
+
                /* create table the first time it is accessed and missing */
                ret = camel_db_prepare_message_info_table (cdb, full_name, error);
        } else if (local_error != NULL)