aboutsummaryrefslogtreecommitdiffstats
path: root/randpkt.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-17 20:03:47 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-18 04:04:19 +0000
commit0885d2945103236f7f475963f66048291f0b18f1 (patch)
tree2c165dd89f97ee9cc33d39f9b7a62840e0ab269b /randpkt.c
parent6011a047d3cd2aba84e7fdd3bf7e8403a2f3563b (diff)
Make sure err_info is always set, and print it iff it's non-null.
Change-Id: Ib5c600c491a3d8adcfa91c00fa9445283610545b Reviewed-on: https://code.wireshark.org/review/5830 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'randpkt.c')
-rw-r--r--randpkt.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/randpkt.c b/randpkt.c
index 1ec7d18baa..d19545987f 100644
--- a/randpkt.c
+++ b/randpkt.c
@@ -622,15 +622,8 @@ main(int argc, char **argv)
/* XXX - report errors! */
if (!wtap_dump(dump, &pkthdr, &buffer[0], &err, &err_info)) {
- switch (err) {
-
- case WTAP_ERR_UNWRITABLE_REC_DATA:
+ if (err_info != NULL)
g_free(err_info);
- break;
-
- default:
- break;
- }
}
}