summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2015-11-25 02:08:38 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2015-11-25 02:08:38 (GMT)
commit3c2f30d2fe07300b25979c42fad985ba95cc1758 (patch)
treecb82c8031cb7da4eb6ce5af503d5aa5184a87eb3
parent882e8e21f8128ee754682d1c4489c4f3fb4697b6 (diff)
downloadlasso-3c2f30d2fe07300b25979c42fad985ba95cc1758.zip
lasso-3c2f30d2fe07300b25979c42fad985ba95cc1758.tar.gz
lasso-3c2f30d2fe07300b25979c42fad985ba95cc1758.tar.bz2
xml: fix leak in lasso_soap_envelope_new_full
-rw-r--r--lasso/xml/soap-1.1/soap_envelope.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lasso/xml/soap-1.1/soap_envelope.c b/lasso/xml/soap-1.1/soap_envelope.c
index fe6e571..9776015 100644
--- a/lasso/xml/soap-1.1/soap_envelope.c
+++ b/lasso/xml/soap-1.1/soap_envelope.c
@@ -143,6 +143,7 @@ lasso_soap_envelope_new_full()
LassoSoapEnvelope *envelope = NULL;
LassoSoapHeader *header = NULL;
LassoSoapBody *body = NULL;
+ LassoSoapEnvelope *result = NULL;
envelope = g_object_new(LASSO_TYPE_SOAP_ENVELOPE, NULL);
goto_cleanup_if_fail(envelope);
@@ -154,12 +155,12 @@ lasso_soap_envelope_new_full()
body = lasso_soap_body_new();
goto_cleanup_if_fail(body);
lasso_assign_gobject(envelope->Body, body);
-
- return envelope;
+ lasso_transfer_gobject(result, envelope);
cleanup:
lasso_release_gobject(envelope);
lasso_release_gobject(header);
lasso_release_gobject(body);
- return NULL;
+
+ return result;
}