samisa 2004/09/07 01:02:05
Modified: c/src/common AxisConfig.cpp
Log:
Fixed few more bugs introduced in fixing memory leaks
Revision Changes Path
1.49 +3 -2 ws-axis/c/src/common/AxisConfig.cpp
Index: AxisConfig.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/common/AxisConfig.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- AxisConfig.cpp 7 Sep 2004 06:47:44 -0000 1.48
+++ AxisConfig.cpp 7 Sep 2004 08:02:05 -0000 1.49
@@ -94,7 +94,8 @@
{
for (int i = 0; i < AXCONF_LAST; i++)
{
- free(m_pcValueArray[i]);
+ if (m_pcValueArray[i])
+ free(m_pcValueArray[i]);
}
if (m_pcAxisHome)
@@ -115,7 +116,7 @@
const char pcComment = '#';
sConfPath = getenv ("AXISCPP_DEPLOY");
- m_pcValueArray[AXCONF_AXISHOME] = sConfPath;
+ m_pcValueArray[AXCONF_AXISHOME] = strdup(sConfPath);
/*
Even if the AXISCPP_DEPLOY environment variable is not set default values
will be used. Therefore return AXIS_SUCCESS
|