aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tacacs.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2008-10-31 00:36:51 +0000
committerStephen Fisher <steve@stephen-fisher.com>2008-10-31 00:36:51 +0000
commit178fda6cfeabb29761f72d1f079984c232ea4bab (patch)
treeda83c6f22d390010d987032896c74c24ef385cbe /epan/dissectors/packet-tacacs.c
parentd8e451b9466b1e2f829da851224ba4d51fa63d2f (diff)
Fix bug #3020: Fix potential memory leaks
svn path=/trunk/; revision=26636
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 );