]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Merge commit '477fe09d005dd951c6404f843a75811fdc993167'
[tcpdump] / tcpdump.c
index f21ec355943c8b0d817a801365bfd1ef1aedb037..41f952f2320ace011497940c1a735b8a6639049c 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -589,6 +589,8 @@ static void
 MakeFilename(char *buffer, char *orig_name, int cnt, int max_chars)
 {
         char *filename = malloc(NAME_MAX + 1);
+       if (filename == NULL)   /* didn't get memory requested  */
+        error("malloc of filename:");
 
         /* Process with strftime if Gflag is set. */
         if (Gflag != 0) {