failure_message.c: fix a memory leak if err is not negative
Bug: 14489 Change-Id: I958cfae824c50263913ba9df8128e34e9466cb67 Reviewed-on: https://code.wireshark.org/review/26294 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
035f49d2c8
commit
b94d3af303
|
@ -60,12 +60,10 @@ void
|
|||
cfile_open_failure_message(const char *progname, const char *filename,
|
||||
int err, gchar *err_info)
|
||||
{
|
||||
char *file_description;
|
||||
|
||||
/* Get a string that describes what we're opening */
|
||||
file_description = input_file_description(filename);
|
||||
|
||||
if (err < 0) {
|
||||
/* Get a string that describes what we're opening */
|
||||
char *file_description = input_file_description(filename);
|
||||
|
||||
/* Wiretap error. */
|
||||
switch (err) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue