diameter: fix a memory leak on startup
authorEvan Huus <eapache@gmail.com>
Thu, 25 Jun 2015 16:54:06 +0000 (09:54 -0700)
committerMichael Mann <mmann78@netscape.net>
Thu, 25 Jun 2015 16:59:45 +0000 (16:59 +0000)
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>
epan/dissectors/packet-diameter.c

index c3b63c01dc4c03c520b3efced670e65831b2f86f..8d4ddb978b2f74728bdd67f04dcefca36db872e1 100644 (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;
        }