summaryrefslogtreecommitdiff
path: root/src/lib/eldbus/eldbus_service.c
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2013-12-07 15:30:09 +0100
committerSebastian Dransfeld <sd@tango.flipp.net>2013-12-07 21:11:33 +0100
commitf950e7990ffa38e3af8916b1e6a10cf392b9fc33 (patch)
treee3cd508956d550d942f3cf6acbe42f607d979206 /src/lib/eldbus/eldbus_service.c
parent494e75eb0e47c3fce0db5f7675cb0ab10bf6671d (diff)
eldbus: free allocated mem on error
Fixes CID 1039177
Diffstat (limited to 'src/lib/eldbus/eldbus_service.c')
-rw-r--r--src/lib/eldbus/eldbus_service.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/eldbus/eldbus_service.c b/src/lib/eldbus/eldbus_service.c
index 4c793c8a1c..4cd8a482e8 100644
--- a/src/lib/eldbus/eldbus_service.c
+++ b/src/lib/eldbus/eldbus_service.c
@@ -893,8 +893,8 @@ _eldbus_service_interface_desc_signals_signatures_get(
893 Eina_Strbuf *buf = eina_strbuf_new(); 893 Eina_Strbuf *buf = eina_strbuf_new();
894 Eina_Array *signatures = eina_array_new(1); 894 Eina_Array *signatures = eina_array_new(1);
895 895
896 EINA_SAFETY_ON_NULL_RETURN_VAL(buf, NULL); 896 EINA_SAFETY_ON_NULL_GOTO(buf, fail_signature);
897 EINA_SAFETY_ON_NULL_RETURN_VAL(signatures, NULL); 897 EINA_SAFETY_ON_NULL_GOTO(signatures, fail_signature);
898 898
899 for (sig = desc->signals; sig && sig->name; sig++) 899 for (sig = desc->signals; sig && sig->name; sig++)
900 { 900 {
@@ -919,8 +919,8 @@ _eldbus_service_interface_desc_signals_signatures_get(
919 return signatures; 919 return signatures;
920 920
921fail_signature: 921fail_signature:
922 eina_strbuf_free(buf); 922 if (buf) eina_strbuf_free(buf);
923 eina_array_free(signatures); 923 if (signatures) eina_array_free(signatures);
924 return NULL; 924 return NULL;
925} 925}
926 926