--- lmtp2nntp_msg.c 2002/05/28 14:17:23 1.26
+++ lmtp2nntp_msg.c 2002/05/29 10:21:33 1.27
@@ -488,16 +488,21 @@
free(hdC->data.m[i]);
}
free (hdC->data.m);
+ hdC->ndata = 0;
} else
- if (hdC->ndata == 1)
+ if (hdC->ndata == 1) {
if (hdC->data.s != NULL)
free(hdC->data.s);
+ hdC->ndata = 0;
+ }
}
static void headernamedestroy(headerdata_t *hdC)
{
- if (hdC->name != NULL)
+ if (hdC->name != NULL) {
free(hdC->name);
+ hdC->name = NULL;
+ }
}
static void headerdestroy(headerdata_t *hdC)
@@ -993,7 +998,6 @@
logbook(ctx->l2, L2_LEVEL_DEBUG, "marking deleted - emtpy headername");
headerdatadestroy(hdNew);
headernamedestroy(hdNew);
- hdNew->ndata = 0;
}
else {
hdNew->name = res_ptr;
@@ -1003,7 +1007,6 @@
logbook(ctx->l2, L2_LEVEL_DEBUG, "marking deleted - empty headervalue before expansion");
headerdatadestroy(hdNew);
headernamedestroy(hdNew);
- hdNew->ndata = 0;
}
else {
/* expanding regex references into header value */
@@ -1028,7 +1031,6 @@
logbook(ctx->l2, L2_LEVEL_DEBUG, "marking deleted - empty headervalue after expansion");
headerdatadestroy(hdNew);
headernamedestroy(hdNew);
- hdNew->ndata = 0;
}
else {
hdNew->data.s = res_ptr;
@@ -1051,7 +1053,6 @@
logbook(ctx->l2, L2_LEVEL_DEBUG, "marking deleted");
headerdatadestroy(hdNew);
headernamedestroy(hdNew);
- hdNew->ndata = 0;
}
else {
/* expanding variables into header value */
@@ -1065,7 +1066,6 @@
logbook(ctx->l2, L2_LEVEL_DEBUG, "marking deleted - empty headervalue after expansion");
headerdatadestroy(hdNew);
headernamedestroy(hdNew);
- hdNew->ndata = 0;
}
else {
headerdatadestroy(hdNew);
|