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>
This commit is contained in:
Guy Harris 2018-03-06 23:17:31 -08:00
parent 68216fa2da
commit f38e895dfc
1 changed files with 10 additions and 8 deletions

View File

@ -61,10 +61,12 @@ cfile_open_failure_message(const char *progname, const char *filename,
int err, gchar *err_info) int err, gchar *err_info)
{ {
if (err < 0) { 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); char *file_description = input_file_description(filename);
/* Wiretap error. */
switch (err) { switch (err) {
case WTAP_ERR_NOT_REGULAR_FILE: case WTAP_ERR_NOT_REGULAR_FILE:
@ -152,13 +154,13 @@ void
cfile_dump_open_failure_message(const char *progname, const char *filename, cfile_dump_open_failure_message(const char *progname, const char *filename,
int err, int file_type_subtype) 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) { 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) { switch (err) {
case WTAP_ERR_NOT_REGULAR_FILE: case WTAP_ERR_NOT_REGULAR_FILE: