Check for NULL return value from wtap_dump_open().
Fixes coverity bug 159. svn path=/trunk/; revision=18005
This commit is contained in:
parent
dbbd8cd9a1
commit
1c57b51e9e
@ -483,6 +483,10 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
dump = wtap_dump_open(produce_filename, WTAP_FILE_PCAP,
|
dump = wtap_dump_open(produce_filename, WTAP_FILE_PCAP,
|
||||||
example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, &err);
|
example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, &err);
|
||||||
|
if (!dump) {
|
||||||
|
printf("Error writing to %s\n", produce_filename);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
seed();
|
seed();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user