diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-13 21:56:47 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-13 21:56:47 +0200 |
commit | aad1e02178acdbdcd59efeadef597a929e9465a7 (patch) | |
tree | 5e2b282c580e825485ea23b954fa5199e255a357 | |
parent | e57d1b319282973949d10372a6e13db625d20fef (diff) | |
download | mblaze-aad1e02178acdbdcd59efeadef597a929e9465a7.tar.gz mblaze-aad1e02178acdbdcd59efeadef597a929e9465a7.tar.xz mblaze-aad1e02178acdbdcd59efeadef597a929e9465a7.zip |
unmime: free some things
Not 100% precise yet.
-rw-r--r-- | unmime.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/unmime.c b/unmime.c index 68ee514..8c0c147 100644 --- a/unmime.c +++ b/unmime.c @@ -19,19 +19,20 @@ void recmime(struct message *msg, int depth) { struct message *imsg = 0; - char *ct, *body; + char *ct, *body, *bodychunk; size_t bodylen; - if (blaze822_mime_body(msg, &ct, &body, &bodylen)) { + if (blaze822_mime_body(msg, &ct, &body, &bodylen, &bodychunk)) { printf("%*.sbody %s len %d\n", depth*2, "", ct, bodylen); - if (strncmp(ct, "multipart/", 10) == 0) + if (strncmp(ct, "multipart/", 10) == 0) { while (blaze822_multipart(msg, &imsg)) recmime(imsg, depth+1); - else if (strncmp(ct, "text/", 5) == 0) { + } else if (strncmp(ct, "text/", 5) == 0) { printf("---\n"); fwrite(body, bodylen, 1, stdout); printf("---\n"); } + free(bodychunk); } } @@ -50,6 +51,8 @@ unmime(char *file) return; recmime(msg, 0); + + blaze822_free(msg); } int |