diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2014-10-15 11:58:40 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2014-10-15 10:53:59 +0000 |
commit | a25ae55c92639afc475e0e3576b2732e5bfaf596 (patch) | |
tree | 754c8f38d4d55415e64a02be7bb84a546d8ff478 | |
parent | bf5b872281432adda2478e51cefdb75d23e74d40 (diff) | |
download | wireshark-a25ae55c92639afc475e0e3576b2732e5bfaf596.tar.gz wireshark-a25ae55c92639afc475e0e3576b2732e5bfaf596.tar.bz2 wireshark-a25ae55c92639afc475e0e3576b2732e5bfaf596.zip |
LDAP: Improved a if-check to avoid a analyzis warning.
Change-Id: Iceeaa94a80543570a720281ac39d3ccd9ac924fa
Reviewed-on: https://code.wireshark.org/review/4699
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r-- | asn1/ldap/packet-ldap-template.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ldap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c index 044143418c..e5a93519e0 100644 --- a/asn1/ldap/packet-ldap-template.c +++ b/asn1/ldap/packet-ldap-template.c @@ -492,7 +492,7 @@ attribute_types_initialize_cb(void) guint i; gchar* attribute_type; - if (attribute_types_hash) { + if (attribute_types_hash && hf) { guint hf_size = g_hash_table_size (attribute_types_hash); /* Unregister all fields */ for (i = 0; i < hf_size; i++) { diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index 4d38bf3f1b..7d28a2b30d 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -706,7 +706,7 @@ attribute_types_initialize_cb(void) guint i; gchar* attribute_type; - if (attribute_types_hash) { + if (attribute_types_hash && hf) { guint hf_size = g_hash_table_size (attribute_types_hash); /* Unregister all fields */ for (i = 0; i < hf_size; i++) { |