summaryrefslogtreecommitdiff
path: root/src/bin/eldbus
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:14:23 +0100
commit0b06725e18079de9ad3020514771062bc3b19080 (patch)
tree1764a7caab1ee93ab8ee9d4e70c095c13e757354 /src/bin/eldbus
parent53537579cddc27dbadf83ab05031e18807707534 (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
Diffstat (limited to 'src/bin/eldbus')
-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);