Free the error info string after using it.

svn path=/trunk/; revision=9855
This commit is contained in:
Guy Harris 2004-01-25 22:21:39 +00:00
parent d20e50f996
commit d6c17f144b
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/* Edit capture files. We can delete records, adjust timestamps, or
* simply convert from one format to another format.
*
* $Id: editcap.c,v 1.28 2004/01/25 21:55:09 guy Exp $
* $Id: editcap.c,v 1.29 2004/01/25 22:21:39 guy Exp $
*
* Originally written by Richard Sharpe.
* Improved by Guy Harris.
@ -396,6 +396,7 @@ int main(int argc, char *argv[])
case WTAP_ERR_UNSUPPORTED_ENCAP:
case WTAP_ERR_BAD_RECORD:
fprintf(stderr, "(%s)\n", err_info);
g_free(err_info);
break;
}
exit(1);

View File

@ -1,6 +1,6 @@
/* Combine two dump files, either by appending or by merging by timestamp
*
* $Id: mergecap.c,v 1.16 2004/01/25 21:55:10 guy Exp $
* $Id: mergecap.c,v 1.17 2004/01/25 22:21:39 guy Exp $
*
* Written by Scott Renfro <scott@renfro.org> based on
* editcap by Richard Sharpe and Guy Harris
@ -349,6 +349,7 @@ open_in_files(int argc, char *argv[], in_file_t *in_files[])
case WTAP_ERR_UNSUPPORTED_ENCAP:
case WTAP_ERR_BAD_RECORD:
fprintf(stderr, "(%s)\n", err_info);
g_free(err_info);
break;
}
} else {