* migrate more of the upload handling to strbuf
[citadel.git] / webcit / messages.c
index 96b35a69a06856086cd68b646399c8be9ed1b58b..47f6f41c5eafb2e90c4efa992a7b57d1637f5268 100644 (file)
@@ -1317,10 +1317,9 @@ void post_message(void)
                 * Transfer control of this memory from the upload struct
                 * to the attachment struct.
                 */
-               att->Data = NewStrBufPlain(WCC->upload, WCC->upload_length);
-               free(WCC->upload);
-               WCC->upload_length = 0;
+               att->Data = WCC->upload;
                WCC->upload = NULL;
+               WCC->upload_length = 0;
                display_enter();
                return;
        }