diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-02-21 21:57:03 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-02-22 16:43:50 +0000 |
commit | 88c34ec6c817d4175643408dcb5e537b5f068602 (patch) | |
tree | abb1f319dd788dedc4acba668cafe87ea5a94df3 /asn1/h248 | |
parent | cfeae2f86c2f4b3dda9c9a73cedcbc04664c8a2a (diff) |
Fix Called function pointer is null (null dereference) found by Clang
../../asn1/h248/packet-h248-template.c:1222:31: warning: Value stored to 'prop' is never read
if (!prop->dissector) prop = &no_param;
Change-Id: I6d380fbb5fef9dc548385b0b470aea1cb3c34df1
Reviewed-on: https://code.wireshark.org/review/301
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'asn1/h248')
-rw-r--r-- | asn1/h248/packet-h248-template.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index 968a5a121e..48782ee59a 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -1218,9 +1218,8 @@ static int dissect_h248_PropertyID(gboolean implicit_tag _U_, tvbuff_t *tvb, int } else { prop = &no_param; } - if (prop && prop->hfid ) { - if (!prop->dissector) prop = &no_param; - prop->dissector(tree, next_tvb, actx->pinfo, *(prop->hfid), &curr_info, prop->data); + if (prop && prop->hfid && prop->dissector) { + prop->dissector(tree, next_tvb, actx->pinfo, *(prop->hfid), &curr_info, prop->data); } return end_offset; |