]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
Printers must use ndo_error() function (via ndo->ndo_error)
[tcpdump] / print-tcp.c
index 0cc338d6d1862e67861edf7c7c193d80826e38bc..5374e8a45f1a1e3b93182abe4ad94783ee4711e7 100644 (file)
@@ -287,7 +287,8 @@ tcp_print(netdissect_options *ndo,
                                         th->nxt = (struct tcp_seq_hash6 *)
                                                 calloc(1, sizeof(*th));
                                         if (th->nxt == NULL)
-                                                error("tcp_print: calloc");
+                                                (*ndo->ndo_error)(ndo,
+                                                                 "tcp_print: calloc");
                                 }
                                 th->addr = tha;
                                 if (rev)
@@ -343,7 +344,8 @@ tcp_print(netdissect_options *ndo,
                                         th->nxt = (struct tcp_seq_hash *)
                                                 calloc(1, sizeof(*th));
                                         if (th->nxt == NULL)
-                                                error("tcp_print: calloc");
+                                                (*ndo->ndo_error)(ndo,
+                                                                 "tcp_print: calloc");
                                 }
                                 th->addr = tha;
                                 if (rev)