Index: gw/smsbox.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsbox.c,v
retrieving revision 1.171
diff -u -r1.171 smsbox.c
--- gw/smsbox.c	2002/02/18 11:47:53	1.171
+++ gw/smsbox.c	2002/02/20 17:18:20
@@ -1247,8 +1247,8 @@
         }
     }
     msg_destroy(msg);
-    list_destroy(receiver, NULL);
-    list_destroy(allowed, NULL);
+    list_destroy(receiver, octstr_destroy_item);
+    list_destroy(allowed, octstr_destroy_item);
 
     /* have all receivers been denied by list rules?! */
     if (no_recv == list_len(denied)) {
@@ -1259,7 +1259,7 @@
     if (list_len(failed_id) > 0)
 	goto error;
     
-    list_destroy(failed_id, NULL);
+    list_destroy(failed_id, octstr_destroy_item);
     octstr_destroy(newfrom);
     *status = HTTP_ACCEPTED;
     returnerror = octstr_create("Sent.");
@@ -1274,7 +1274,7 @@
             octstr_format_append(returnerror, " %s", octstr_get_cstr(receiv));
         }
     }               
-    list_destroy(denied, NULL);  
+    list_destroy(denied, octstr_destroy_item);  
     return returnerror;
     
 
@@ -1307,8 +1307,8 @@
     }
 
     octstr_destroy(receiv); 
-    list_destroy(failed_id, NULL);
-    list_destroy(denied, NULL);
+    list_destroy(failed_id, octstr_destroy_item);
+    list_destroy(denied, octstr_destroy_item);
     return returnerror;
 }
 
@@ -1559,6 +1559,7 @@
     octstr_destroy(pass);
     octstr_destroy(udh);
     octstr_destroy(smsc);
+    octstr_destroy(dlr_url);
     octstr_destroy(account);
     return ret;
 }
Index: gwlib/http.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/http.c,v
retrieving revision 1.159
diff -u -r1.159 http.c
--- gwlib/http.c	2002/01/18 18:35:21	1.159
+++ gwlib/http.c	2002/02/20 17:18:54
@@ -1434,12 +1434,18 @@
 	return !use_version_1_0;
     } else {
         if (use_version_1_0) {
-	    if (octstr_compare(h, octstr_imm("keep-alive")) == 0)
+	    if (octstr_compare(h, octstr_imm("keep-alive")) == 0) {
+		octstr_destroy(h);
 	        return 1;
-	    else
+	    } else {
+		octstr_destroy(h);
 		return 0;
-	} else if (octstr_compare(h, octstr_imm("close")) == 0)
+	    }
+	} else if (octstr_compare(h, octstr_imm("close")) == 0) {
+	    octstr_destroy(h);
 	    return 0;
+	}
+	octstr_destroy(h);
     }
 
     return 1;
