]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print.c
Introduce a buffer stack, and use it for ESP decryption.
[tcpdump] / print.c
diff --git a/print.c b/print.c
index 1669cb3b4db680eeab7ae3a4fda9504b3ea1573b..21182ba26d2604ae51c54587d8a5bb7216933757 100644 (file)
--- a/print.c
+++ b/print.c
@@ -405,6 +405,13 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h,
                ND_PRINT(" [|%s]", ndo->ndo_protocol);
        }
 
+       /*
+        * Free all pushed buffers; if we got here by a printer quitting,
+        * we need to release anything that didn't get released because
+        * we longjmped out of the code before it popped a buffer.
+        */
+       nd_pop_all_buffers(ndo);
+
        /*
         * Restore the original snapend, as a printer might have
         * changed it.