summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2014-11-24 10:04:03 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2014-11-24 10:17:25 +0100
commit1bc5195a1a042fa90d40a79785622109f25442b1 (patch)
tree0c4057d33acee77c3c0b1eb18e0ac1d476d933f1
parent670374fcb99fd0a8b90f623ea9711028fd5cb986 (diff)
eldbus-codegen: More memory leak fixes for generated code.
Same fix as we did for simple method calls we need in complex method calls as well. Unref message on error path. @fix
-rw-r--r--src/bin/eldbus/source_client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/eldbus/source_client.c b/src/bin/eldbus/source_client.c
index 07f5773615..8d5fdd143b 100644
--- a/src/bin/eldbus/source_client.c
+++ b/src/bin/eldbus/source_client.c
@@ -101,6 +101,7 @@ source_client_complex_method_call_generate(const DBus_Method *method, Eina_Strbu
101 eina_strbuf_append_printf(c_code, " if (!eldbus_message_from_eina_value(\"%s\", msg, args))\n", eina_strbuf_string_get(full_signature)); 101 eina_strbuf_append_printf(c_code, " if (!eldbus_message_from_eina_value(\"%s\", msg, args))\n", eina_strbuf_string_get(full_signature));
102 eina_strbuf_append_printf(c_code, " {\n"); 102 eina_strbuf_append_printf(c_code, " {\n");
103 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message from eina value.\");\n"); 103 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message from eina value.\");\n");
104 eina_strbuf_append_printf(c_code, " eldbus_message_unref(msg);\n");
104 eina_strbuf_append_printf(c_code, " return;\n"); 105 eina_strbuf_append_printf(c_code, " return;\n");
105 eina_strbuf_append_printf(c_code, " }\n"); 106 eina_strbuf_append_printf(c_code, " }\n");
106 eina_strbuf_append_printf(c_code, " eldbus_proxy_send(proxy, msg, %s, NULL, -1);\n", method->cb_name); 107 eina_strbuf_append_printf(c_code, " eldbus_proxy_send(proxy, msg, %s, NULL, -1);\n", method->cb_name);
@@ -120,6 +121,7 @@ source_client_complex_method_call_generate(const DBus_Method *method, Eina_Strbu
120 eina_strbuf_append_printf(c_code, " if (!eldbus_message_from_eina_value(\"%s\", msg, args))\n", eina_strbuf_string_get(full_signature)); 121 eina_strbuf_append_printf(c_code, " if (!eldbus_message_from_eina_value(\"%s\", msg, args))\n", eina_strbuf_string_get(full_signature));
121 eina_strbuf_append_printf(c_code, " {\n"); 122 eina_strbuf_append_printf(c_code, " {\n");
122 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message from eina value.\");\n"); 123 eina_strbuf_append_printf(c_code, " ERR(\"Error: Filling message from eina value.\");\n");
124 eina_strbuf_append_printf(c_code, " eldbus_message_unref(msg);\n");
123 eina_strbuf_append_printf(c_code, " return NULL;\n"); 125 eina_strbuf_append_printf(c_code, " return NULL;\n");
124 eina_strbuf_append_printf(c_code, " }\n"); 126 eina_strbuf_append_printf(c_code, " }\n");
125 eina_strbuf_append_printf(c_code, " p = eldbus_proxy_send(proxy, msg, %s, cb, -1);\n", method->cb_name); 127 eina_strbuf_append_printf(c_code, " p = eldbus_proxy_send(proxy, msg, %s, cb, -1);\n", method->cb_name);