Index: gwlib/mime.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/mime.c,v
retrieving revision 1.16
diff -u -r1.16 mime.c
--- gwlib/mime.c	12 Oct 2006 23:54:46 -0000	1.16
+++ gwlib/mime.c	1 Nov 2006 06:08:34 -0000
@@ -204,6 +204,7 @@
     octstr_destroy(value);
     if (boundary_elem)
         *boundary_elem = boundary;
-    octstr_destroy(boundary);
+    else
+    	octstr_destroy(boundary);
 }
 
