Clean up better if we can't open a radius dictionary included by another
authorEvan Huus <eapache@gmail.com>
Sat, 6 Oct 2012 23:56:56 +0000 (23:56 -0000)
committerEvan Huus <eapache@gmail.com>
Sat, 6 Oct 2012 23:56:56 +0000 (23:56 -0000)
radius dictionary. One of many issues with the way we load radius
dictionaries.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7803

svn path=/trunk/; revision=45359

epan/radius_dict.l

index 0306ddd663bccd3bc597cb272a757207ca84cd81..1d27917a7ff79f5cc8aa35640ea18d27d6e038bd 100644 (file)
        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();
                }
        } else {