mbuf: Be extra careful with freed pointer

As coverity reports, we are not supposed to do anything with a freed
pointer, not even assigning it to m. So break the loop before doing so.
diff --git a/src/mbuf.c b/src/mbuf.c
index edcd99c..70c39be 100644
--- a/src/mbuf.c
+++ b/src/mbuf.c
@@ -39,7 +39,7 @@
         next = m->m_next;
 
         last = false;
-        do {
+        while (1) {
             next2 = m->m_nextpkt;
 
             if (pkts) {
@@ -54,8 +54,11 @@
             }
 
             g_free(m);
+
+            if (last)
+                break;
             m = next2;
-        } while (!last);
+        };
 
         m = next;
     }