diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-03-06 23:17:31 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-03-07 07:18:21 +0000 |
commit | f38e895dfc0d97bce64f73ce99df706911d9aa07 (patch) | |
tree | 2bbee29394488137486a5b126c4219c0210255a4 | |
parent | 68216fa2da7bf608441356593a5059913c7e1a97 (diff) |
Plug another leak for Wiretap errors.
Clean up comments while we're at it.
Change-Id: I7e218ba3f998804045e3d7fab08d85d09a293d69
Reviewed-on: https://code.wireshark.org/review/26320
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | ui/failure_message.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ui/failure_message.c b/ui/failure_message.c index 34944c069b..9fc04ecb22 100644 --- a/ui/failure_message.c +++ b/ui/failure_message.c @@ -61,10 +61,12 @@ cfile_open_failure_message(const char *progname, const char *filename, int err, gchar *err_info) { if (err < 0) { - /* Get a string that describes what we're opening */ + /* + * Wiretap error. + * Get a string that describes what we're opening. + */ char *file_description = input_file_description(filename); - /* Wiretap error. */ switch (err) { case WTAP_ERR_NOT_REGULAR_FILE: @@ -152,13 +154,13 @@ void cfile_dump_open_failure_message(const char *progname, const char *filename, int err, int file_type_subtype) { - char *file_description; - - /* Get a string that describes what we're opening */ - file_description = output_file_description(filename); - if (err < 0) { - /* Wiretap error. */ + /* + * Wiretap error. + * Get a string that describes what we're opening. + */ + char *file_description = input_file_description(filename); + switch (err) { case WTAP_ERR_NOT_REGULAR_FILE: |