[prev in list] [next in list] [prev in thread] [next in thread]
List: axis-dev
Subject: svn commit: r381574 -
From: nandika () apache ! org
Date: 2006-02-28 5:52:30
Message-ID: 20060228055230.79189.qmail () minotaur ! apache ! org
[Download RAW message or body]
Author: nandika
Date: Mon Feb 27 21:52:29 2006
New Revision: 381574
URL: http://svn.apache.org/viewcvs?rev=381574&view=rev
Log:
local variable key is replaced with a malloced value
Modified:
webservices/axis2/trunk/c/modules/xml/soap/soap_header.c
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_header.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_header.c?rev=381574&r1=381573&r2=381574&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_header.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_header.c Mon Feb 27 21:52:29 2006
@@ -226,8 +226,15 @@
axis2_hash_this (hi, &key, NULL, &val);
if (val)
- AXIS2_SOAP_HEADER_BLOCK_FREE((axis2_soap_header_block_t *)val, \
env);
- val = NULL;
+ { AXIS2_SOAP_HEADER_BLOCK_FREE((axis2_soap_header_block_t *)val, \
env); + val = NULL;
+ }
+ if(key)
+ {
+ AXIS2_FREE((*env)->allocator, key);
+ key = NULL;
+ }
+
}
AXIS2_FREE((*env)->allocator, hi);
@@ -252,7 +259,7 @@
axis2_soap_header_impl_t *header_impl = NULL;
axis2_soap_header_block_t *header_block = NULL;
axis2_om_node_t* header_block_node = NULL;
- axis2_char_t key[10];
+ axis2_char_t *key = NULL;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK((*env)->error, localname, NULL);
AXIS2_PARAM_CHECK((*env)->error, ns, NULL);
@@ -264,6 +271,7 @@
header_block, env);
AXIS2_OM_NODE_SET_BUILD_STATUS(header_block_node, env, AXIS2_TRUE);
+ key = (axis2_char_t*)AXIS2_MALLOC((*env)->allocator, sizeof(axis2_char_t)*10);
sprintf(key,"%d", header_impl->hbnumber++);
if(header_impl->header_blocks)
{
@@ -401,11 +409,12 @@
axis2_env_t **env,
struct axis2_soap_header_block *header_block)
{
- axis2_char_t key[10];
+ axis2_char_t *key = NULL ;
axis2_soap_header_impl_t *header_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, header_block, AXIS2_FAILURE);
header_impl = AXIS2_INTF_TO_IMPL(header);
+ key = (axis2_char_t*)AXIS2_MALLOC((*env)->allocator, sizeof(axis2_char_t)*10);
sprintf(key,"%d", header_impl->hbnumber++);
if(header_impl->header_blocks)
{
@@ -502,4 +511,4 @@
axis2_soap_header_impl_t *header_impl = NULL;
header_impl = AXIS2_INTF_TO_IMPL(header);
return header_impl->header_blocks;
-}
+}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic