Fixes leak 13/26
[modest] / src / modest-tny-msg.c
index a249f7c..797c03f 100644 (file)
@@ -33,6 +33,7 @@
 #include <tny-simple-list.h>
 #include <tny-folder.h>
 #include <modest-runtime.h>
+#include <modest-defs.h>
 #include "modest-formatter.h"
 #include <tny-camel-mem-stream.h>
 #include <tny-camel-mime-part.h>
@@ -488,6 +489,7 @@ modest_tny_msg_find_body_part_from_mime_part (TnyMimePart *msg, gboolean want_ht
 
                        if (!part) {
                                g_warning ("%s: not a valid mime part", __FUNCTION__);
+                               tny_iterator_next (iter);
                                continue;
                        }