]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Merge remote-tracking branch 'upstream/master'
[tcpdump] / tcpdump.c
index 59aae52764ac6750def856e052e381c041d6199f..c43ab8549548f620f2715f707027477ba540f1a5 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);
 MakeFilename(char *buffer, char *orig_name, int cnt, int max_chars)
 {
         char *filename = malloc(NAME_MAX + 1);
+        if (filename == NULL)
+            error("Makefilename: malloc);
 
         /* Process with strftime if Gflag is set. */
         if (Gflag != 0) {
 
         /* Process with strftime if Gflag is set. */
         if (Gflag != 0) {