OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c versions 1.37 and 1.38
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c 1.37 -> 1.38

--- lmtp2nntp_msg.c      2003/02/10 10:13:12     1.37
+++ lmtp2nntp_msg.c      2003/02/11 15:03:18     1.38
@@ -717,13 +717,15 @@
 
     try {
         headerdata_t *hdI;
+        headerdata_t *hdN;
 
         if (msg->azHeaders != NULL)
             free(msg->azHeaders);
         msg->azHeaders = NULL;
         msg->asHeaders = 0;
 
-        for (hdI = msg->hdFirst; hdI != NULL; hdI = hdI->next) { /* for each header */
+        hdI = msg->hdFirst; /* for each header */
+        while (hdI != NULL) {
             logbook(msg->l2, L2_LEVEL_DEBUG, "processing matrix header \"%s\"", hdI->name);
             if (hdI->name == NULL || strlen(hdI->name) == 0 || hdI->ndata == 0)
                 continue;
@@ -743,6 +745,12 @@
                     argz_add(&msg->azHeaders, &msg->asHeaders, hdI->data.m[i]);
                 }
             }
+            /* cleanup */
+            hdN = hdI->next;
+            hdI->prev = NULL;
+            hdI->next = NULL;
+            headerdestroy(hdI);
+            hdI = hdN;
         }
     }
     catch(ex) {

CVSTrac 2.0.1