diameter: fix a memory leak on startup

If we can't read the dictionary containing all our definitions, free necessary
memory before returning.

Change-Id: I814962d920852b9a82acb3bb2e7bc41addd835f7
Reviewed-on: https://code.wireshark.org/review/9131
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Evan Huus 2015-06-25 09:54:06 -07:00 committed by Michael Mann
parent 74e526f196
commit 6c698f3b8a
1 changed files with 2 additions and 0 deletions

View File

@ -1835,6 +1835,8 @@ dictionary_load(void)
d = ddict_scan(dir,"dictionary.xml",do_debug_parser);
g_free(dir);
if (d == NULL) {
g_hash_table_destroy(vendors);
g_array_free(vnd_shrt_arr, TRUE);
return 0;
}