diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-05-09 22:37:41 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2018-05-14 13:44:23 +0000 |
commit | 10306f9a32ee4ca65283110ac286bb1ba9ef2a01 (patch) | |
tree | 05e4b1ac1b9387f00007ad583571d2a57566c0e7 /epan/oids.c | |
parent | bb81e1807b2a5b67905cfa1594dbbb535fe8b37e (diff) |
Free g_array_free-related memory leaks
g_array_free(a, FALSE) returns "a->data". Callers that do not handle
this will leak memory. Convert other users to use the return value
instead of direct access to "a->data".
Change-Id: I0a29864e8106c0bf09e9573ef29e4474179c4171
Reviewed-on: https://code.wireshark.org/review/27438
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/oids.c')
-rw-r--r-- | epan/oids.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/oids.c b/epan/oids.c index b30ed2d084..400f7b8ac6 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -660,8 +660,7 @@ static void register_mibs(void) { } } - hf.hfinfo.strings = vals->data; - g_array_free(vals,FALSE); + hf.hfinfo.strings = g_array_free(vals, FALSE); } #if 0 /* packet-snmp does not handle bits yet */ } else if (smiType->basetype == SMI_BASETYPE_BITS && ( smiEnum = smiGetFirstNamedNumber(smiType) )) { |