aboutsummaryrefslogtreecommitdiffstats
path: root/epan/radius_dict.l
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2012-10-07 01:15:16 +0000
committerEvan Huus <eapache@gmail.com>2012-10-07 01:15:16 +0000
commit29fa1e7835c8930430366c6eaf91f37a32fc792c (patch)
tree542729db749b6a22646932078fd9cff564530552 /epan/radius_dict.l
parent0c966e603e4b87ee8e0b903228fb0a0c7a9f3b74 (diff)
Clean up properly when we can't find a radius $INCLUDE regardless of the
state of errno. Don't treat it as a fatal parse error because it isn't, so we keep parsing the rest of the dictionaries even if one is missing. svn path=/trunk/; revision=45361
Diffstat (limited to 'epan/radius_dict.l')
-rw-r--r--epan/radius_dict.l16
1 files changed, 11 insertions, 5 deletions
diff --git a/epan/radius_dict.l b/epan/radius_dict.l
index 309dbb3104..b0651c0553 100644
--- a/epan/radius_dict.l
+++ b/epan/radius_dict.l
@@ -265,12 +265,18 @@
if (!yyin) {
if (errno) {
- g_string_append_printf(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], g_strerror(errno) );
- g_free(fullpaths[include_stack_ptr]);
- fullpaths[include_stack_ptr] = NULL;
- include_stack_ptr--;
- yyterminate();
+ g_string_append_printf(error,
+ "Could not open file: '%s', error: %s\n",
+ fullpaths[include_stack_ptr],
+ g_strerror(errno) );
+ } else {
+ g_string_append_printf(error,
+ "Could not open file: '%s', no errno\n",
+ fullpaths[include_stack_ptr]);
}
+ g_free(fullpaths[include_stack_ptr]);
+ fullpaths[include_stack_ptr] = NULL;
+ include_stack_ptr--;
} else {
linenums[include_stack_ptr] = 1;
yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE ) );