Use and free err_info in cf_continue_tail() and cf_finish_tail(). (Untested because I'm not sure how to corrupt a file to exercise this code path...) svn path=/trunk/; revision=45032
This commit is contained in:
parent
4faf909267
commit
93b1a4d511
9
file.c
9
file.c
|
@ -860,8 +860,9 @@ cf_continue_tail(capture_file *cf, volatile int to_read, int *err)
|
||||||
} else if (*err != 0) {
|
} else if (*err != 0) {
|
||||||
/* We got an error reading the capture file.
|
/* We got an error reading the capture file.
|
||||||
XXX - pop up a dialog box instead? */
|
XXX - pop up a dialog box instead? */
|
||||||
g_warning("Error \"%s\" while reading: \"%s\"\n",
|
g_warning("Error \"%s\" while reading: \"%s\" (\"%s\")",
|
||||||
wtap_strerror(*err), cf->filename);
|
wtap_strerror(*err), err_info, cf->filename);
|
||||||
|
g_free(err_info);
|
||||||
|
|
||||||
return CF_READ_ERROR;
|
return CF_READ_ERROR;
|
||||||
} else
|
} else
|
||||||
|
@ -958,6 +959,10 @@ cf_finish_tail(capture_file *cf, int *err)
|
||||||
if (*err != 0) {
|
if (*err != 0) {
|
||||||
/* We got an error reading the capture file.
|
/* We got an error reading the capture file.
|
||||||
XXX - pop up a dialog box? */
|
XXX - pop up a dialog box? */
|
||||||
|
|
||||||
|
g_warning("Error \"%s\" while reading: \"%s\" (\"%s\")",
|
||||||
|
wtap_strerror(*err), err_info, cf->filename);
|
||||||
|
g_free(err_info);
|
||||||
return CF_READ_ERROR;
|
return CF_READ_ERROR;
|
||||||
} else {
|
} else {
|
||||||
return CF_READ_OK;
|
return CF_READ_OK;
|
||||||
|
|
Loading…
Reference in New Issue