diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-01-13 12:13:45 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-01-13 20:20:03 +0000 |
commit | bc23f797296582d5aca5029dd34244de41ff8605 (patch) | |
tree | c582e37dbe1f7186d2a8f16e8c6b22ab608b055d /epan/dissectors/packet-isakmp.c | |
parent | a988253fef15e6a0ddd05b0fb06e18ccde00082b (diff) |
UAT error string pointers should not be const pointers.
UAT error strings are usually allocated by g_strdup() or
g_strdup_printf(), and must ultimately be freed by the caller.
Make the pointer-to-error-string-pointer arguments to various functions
be "char **", not "const char **".
Fix cases that finds where a raw string was being used, as that won't
work if you try to free it; g_strdup() it instead.
Add a missing free of an error string.
Remove some no-longer-necessary casts.
Remove some unnecessary g_strdup()s (the string being handed to it was
already g_malloc()ated).
Change some variable declarations to match.
Put in XXX comments for some cases where the error string is just freed,
without being shown to the user.
Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0
Reviewed-on: https://code.wireshark.org/review/6525
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-isakmp.c')
-rw-r--r-- | epan/dissectors/packet-isakmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index fbcfe9f9e5..ac6d8ee8e0 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -4994,7 +4994,7 @@ isakmp_prefs_apply_cb(void) { UAT_BUFFER_CB_DEF(ikev1_users, icookie, ikev1_uat_data_key_t, icookie, icookie_len) UAT_BUFFER_CB_DEF(ikev1_users, key, ikev1_uat_data_key_t, key, key_len) -static void ikev1_uat_data_update_cb(void* p, const char** err) { +static void ikev1_uat_data_update_cb(void* p, char** err) { ikev1_uat_data_key_t *ud = (ikev1_uat_data_key_t *)p; if (ud->icookie_len != COOKIE_SIZE) { @@ -5023,7 +5023,7 @@ UAT_BUFFER_CB_DEF(ikev2_users, sk_ai, ikev2_uat_data_t, sk_ai, sk_ai_len) UAT_BUFFER_CB_DEF(ikev2_users, sk_ar, ikev2_uat_data_t, sk_ar, sk_ar_len) UAT_VS_DEF(ikev2_users, auth_alg, ikev2_uat_data_t, guint, IKEV2_AUTH_HMAC_SHA1_96, IKEV2_AUTH_HMAC_SHA1_96_STR) -static void ikev2_uat_data_update_cb(void* p, const char** err) { +static void ikev2_uat_data_update_cb(void* p, char** err) { ikev2_uat_data_t *ud = (ikev2_uat_data_t *)p; if (ud->key.spii_len != COOKIE_SIZE) { |