Hunting a bug in scheduled threads that caused a segflt. Got it and
[citadel.git] / citadel / modules / rssclient / serv_rssclient.c
index 4ef2cfb321ec1761b9748d12d24f09dbd3834c69..e27f888d41a53153b5707bc6ac581a4cfe6eeff2 100644 (file)
@@ -162,13 +162,13 @@ void rss_save_item(struct rss_item *ri) {
 
                CtdlSubmitMsg(msg, recp, NULL);
                CtdlFreeMessage(msg);
-               free_recipients(recp);
 
                /* write the uidl to the use table so we don't store this item again */
                strcpy(ut.ut_msgid, utmsgid);
                ut.ut_timestamp = time(NULL);
                cdb_store(CDB_USETABLE, utmsgid, strlen(utmsgid), &ut, sizeof(struct UseTable) );
        }
+       free_recipients(recp);
 }