BUG: Fix destruction of objects
This commit is contained in:
parent
8248953df1
commit
55f5007a6d
|
@ -25,7 +25,6 @@ main(int const argc,
|
||||||
const char ** const argv ATTR_UNUSED) {
|
const char ** const argv ATTR_UNUSED) {
|
||||||
|
|
||||||
xmlrpc_env env;
|
xmlrpc_env env;
|
||||||
xmlrpc_value *result;
|
|
||||||
char *state_name;
|
char *state_name;
|
||||||
int cc;
|
int cc;
|
||||||
|
|
||||||
|
@ -43,6 +42,7 @@ main(int const argc,
|
||||||
/* Call the famous server at UserLand. */
|
/* Call the famous server at UserLand. */
|
||||||
for ( cc = 30; cc < 35; cc ++ )
|
for ( cc = 30; cc < 35; cc ++ )
|
||||||
{
|
{
|
||||||
|
xmlrpc_value *result;
|
||||||
result = xmlrpc_client_call(&env, "http://betty.userland.com/RPC2",
|
result = xmlrpc_client_call(&env, "http://betty.userland.com/RPC2",
|
||||||
"examples.getStateName",
|
"examples.getStateName",
|
||||||
"(i)", (xmlrpc_int32) cc);
|
"(i)", (xmlrpc_int32) cc);
|
||||||
|
@ -52,11 +52,12 @@ main(int const argc,
|
||||||
xmlrpc_parse_value(&env, result, "s", &state_name);
|
xmlrpc_parse_value(&env, result, "s", &state_name);
|
||||||
die_if_fault_occurred(&env);
|
die_if_fault_occurred(&env);
|
||||||
printf("%d: %s\n", cc, state_name);
|
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. */
|
/* Clean up our error-handling environment. */
|
||||||
xmlrpc_env_clean(&env);
|
xmlrpc_env_clean(&env);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue