diff options
author | Evan Huus <eapache@gmail.com> | 2013-10-25 22:14:25 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-10-25 22:14:25 +0000 |
commit | 95f484a91ee34ea3caa2c325170e52d0bf07489b (patch) | |
tree | 83a02ff6f4f38f36c739e437881a432c75eb88b6 /epan/dissectors/packet-ieee80211.c | |
parent | 7a3febacac8fd14009dc82dc4d139ee43d37a437 (diff) |
Add a very small hack to make the UAT update callback error string freeable, and
convert all existing UAT update callbacks to use glib memory instead of
ephemeral memory for that string.
UAT code paths are entirely distinct from packet dissection, so using ephemeral
memory was the wrong choice, because there was no guarantees about when it would
be freed.
The move away from emem still needs to be propogated deeper into the UAT code
itself at some point.
Net effect: remove another bunch of emem calls from dissectors, where replacing
with wmem would have caused assertions.
svn path=/trunk/; revision=52854
Diffstat (limited to 'epan/dissectors/packet-ieee80211.c')
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index eb55219ae3..beab53d256 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -172,7 +172,7 @@ uat_wep_key_record_update_cb(void* r, const char** err) decryption_key_t* dk; if (rec->string == NULL) { - *err = ep_strdup_printf("Key can't be blank"); + *err = g_strdup("Key can't be blank"); } else { g_strstrip(rec->string); dk = parse_key_string(rec->string, rec->key); @@ -183,25 +183,25 @@ uat_wep_key_record_update_cb(void* r, const char** err) case AIRPDCAP_KEY_TYPE_WEP_40: case AIRPDCAP_KEY_TYPE_WEP_104: if (rec->key != AIRPDCAP_KEY_TYPE_WEP) { - *err = ep_strdup_printf("Invalid key format"); + *err = g_strdup("Invalid key format"); } break; case AIRPDCAP_KEY_TYPE_WPA_PWD: if (rec->key != AIRPDCAP_KEY_TYPE_WPA_PWD) { - *err = ep_strdup_printf("Invalid key format"); + *err = g_strdup("Invalid key format"); } break; case AIRPDCAP_KEY_TYPE_WPA_PSK: if (rec->key != AIRPDCAP_KEY_TYPE_WPA_PSK) { - *err = ep_strdup_printf("Invalid key format"); + *err = g_strdup("Invalid key format"); } break; default: - *err = ep_strdup_printf("Invalid key format"); + *err = g_strdup("Invalid key format"); break; } } else { - *err = ep_strdup_printf("Invalid key format"); + *err = g_strdup("Invalid key format"); } } } |