aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-ieee80211.c')
-rw-r--r--epan/dissectors/packet-ieee80211.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index ed0e7d46ca..574cb45f6c 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -146,11 +146,7 @@ uat_wep_key_record_copy_cb(void* n, const void* o, size_t siz _U_)
uat_wep_key_record_t* new_key = (uat_wep_key_record_t *)n;
const uat_wep_key_record_t* old_key = (const uat_wep_key_record_t *)o;
- if (old_key->string) {
- new_key->string = g_strdup(old_key->string);
- } else {
- new_key->string = NULL;
- }
+ new_key->string = g_strdup(old_key->string);
return new_key;
}
@@ -210,8 +206,7 @@ static void
uat_wep_key_record_free_cb(void*r)
{
uat_wep_key_record_t* key = (uat_wep_key_record_t *)r;
-
- if (key->string) g_free(key->string);
+ g_free(key->string);
}
UAT_VS_DEF(uat_wep_key_records, key, uat_wep_key_record_t, guint8, 0, STRING_KEY_TYPE_WEP)