diff options
author | Gerald Combs <gerald@wireshark.org> | 2005-05-30 20:55:16 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2005-05-30 20:55:16 +0000 |
commit | 12b7466381656fa660f740ab4cfce817c0d74070 (patch) | |
tree | 7e29eeb62025a91bee2c6b7ffdfae0a2ed7243b9 /asn1/camel/packet-camel-template.c | |
parent | 1d3ba8764b7cdc2122f3823bd25d00578eaa9e7a (diff) |
From Steve Grubb: Fix a memory leak.
Don't pass a null to atoi().
Fixes part of bug 217.
svn path=/trunk/; revision=14495
Diffstat (limited to 'asn1/camel/packet-camel-template.c')
-rw-r--r-- | asn1/camel/packet-camel-template.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/asn1/camel/packet-camel-template.c b/asn1/camel/packet-camel-template.c index 452f0e7135..0f8226b6b3 100644 --- a/asn1/camel/packet-camel-template.c +++ b/asn1/camel/packet-camel-template.c @@ -508,8 +508,11 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac application_context_version = 0; if (pinfo->private_data != NULL){ version_ptr = strrchr(pinfo->private_data,'.'); - version_str = g_strdup(version_ptr+1); - application_context_version = atoi(version_str); + if (version_ptr) { + version_str = g_strdup(version_ptr+1); + application_context_version = atoi(version_str); + g_free(version_str); + } } camel_pdu_type = tvb_get_guint8(tvb, offset)&0x0f; |