summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-03-06 13:52:50 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-03-06 13:52:50 (GMT)
commit55f5007a6d40b7ec8b82b4920c281dc45638e6c3 (patch)
tree09f0b231e4153d0ec837e0174bebfc9c4071e69e
parent8248953df197e5c6c01c501be3fb8f7c1dcb9b0b (diff)
downloadCMake-55f5007a6d40b7ec8b82b4920c281dc45638e6c3.zip
CMake-55f5007a6d40b7ec8b82b4920c281dc45638e6c3.tar.gz
CMake-55f5007a6d40b7ec8b82b4920c281dc45638e6c3.tar.bz2
BUG: Fix destruction of objects
-rw-r--r--Utilities/cmxmlrpc/synch_client.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Utilities/cmxmlrpc/synch_client.c b/Utilities/cmxmlrpc/synch_client.c
index 532416e..7c81485 100644
--- a/Utilities/cmxmlrpc/synch_client.c
+++ b/Utilities/cmxmlrpc/synch_client.c
@@ -25,7 +25,6 @@ main(int const argc,
const char ** const argv ATTR_UNUSED) {
xmlrpc_env env;
- xmlrpc_value *result;
char *state_name;
int cc;
@@ -43,6 +42,7 @@ main(int const argc,
/* Call the famous server at UserLand. */
for ( cc = 30; cc < 35; cc ++ )
{
+ xmlrpc_value *result;
result = xmlrpc_client_call(&env, "http://betty.userland.com/RPC2",
"examples.getStateName",
"(i)", (xmlrpc_int32) cc);
@@ -52,11 +52,12 @@ main(int const argc,
xmlrpc_parse_value(&env, result, "s", &state_name);
die_if_fault_occurred(&env);
printf("%d: %s\n", cc, state_name);
+
+ /* Dispose of our result value. */
+ xmlrpc_DECREF(result);
+
}
- /* Dispose of our result value. */
- xmlrpc_DECREF(result);
-
/* Clean up our error-handling environment. */
xmlrpc_env_clean(&env);