aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tacacs.c
diff options
context:
space:
mode:
authorsfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>2008-10-31 00:36:51 +0000
committersfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>2008-10-31 00:36:51 +0000
commitfae4b10f10a46a80864642799aa82ac8474e27ea (patch)
treeda83c6f22d390010d987032896c74c24ef385cbe /epan/dissectors/packet-tacacs.c
parentf8afb6654abedfba50fdb6313aa83f7cd8c8dce6 (diff)
Fix bug #3020: Fix potential memory leaks
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26636 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-tacacs.c')
-rw-r--r--epan/dissectors/packet-tacacs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tacacs.c b/epan/dissectors/packet-tacacs.c
index b485210f34..2a3d5b0edd 100644
--- a/epan/dissectors/packet-tacacs.c
+++ b/epan/dissectors/packet-tacacs.c
@@ -867,12 +867,16 @@ parse_tuple( char *key_from_option )
printf("keys: %s\n", key_from_option );
*/
client=strchr(key_from_option,'/');
- if(!client)
+ if(!client) {
+ g_free(tacplus_data);
return;
+ }
*client++='\0';
key=strchr(client,'=');
- if(!key)
+ if(!key) {
+ g_free(tacplus_data);
return;
+ }
*key++='\0';
/*
printf("%s %s => %s\n", key_from_option, client, key );