Check for NULL return value from wtap_dump_open().

Fixes coverity bug 159.

svn path=/trunk/; revision=18005
This commit is contained in:
Gilbert Ramirez 2006-04-26 17:31:56 +00:00
parent dbbd8cd9a1
commit 1c57b51e9e
1 changed files with 4 additions and 0 deletions

View File

@ -483,6 +483,10 @@ main(int argc, char **argv)
dump = wtap_dump_open(produce_filename, WTAP_FILE_PCAP,
example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, &err);
if (!dump) {
printf("Error writing to %s\n", produce_filename);
exit(1);
}
seed();