Enlightenment CVS committal
Author : stffrdhrn
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_ipc_handlers.h
Log Message:
Missed a lot of these freeing for possible NULL pointers
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -3 -r1.124 -r1.125
--- e_ipc_handlers.h 2 Mar 2006 14:07:07 -0000 1.124
+++ e_ipc_handlers.h 2 Mar 2006 14:18:40 -0000 1.125
@@ -29,7 +29,7 @@
char *__str = NULL; \
if (e_ipc_codec_str_dec(e->data, e->size, &__str)) {
# define END_STRING(__str) \
- if (__str) free(__str); \
+ E_FREE(__str); \
} \
} \
break;
@@ -48,8 +48,8 @@
__str1 = __2str->str1; \
__str2 = __2str->str2;
# define END_STRING2(__2str) \
- free(__2str->str1); \
- free(__2str->str2); \
+ E_FREE(__2str->str1); \
+ E_FREE(__2str->str2); \
free(__2str); \
} \
} \
@@ -66,9 +66,9 @@
__3int_3str = calloc(1, sizeof(E_Ipc_3Int_3Str)); \
if (e_ipc_codec_3int_3str_dec(e->data, e->size, &(__3int_3str))) {
# define END_INT3_STRING3(__3int_3str) \
- free(__3int_3str->str1); \
- free(__3int_3str->str2); \
- free(__3int_3str->str3); \
+ E_FREE(__3int_3str->str1); \
+ E_FREE(__3int_3str->str2); \
+ E_FREE(__3int_3str->str3); \
free(__3int_3str); \
} \
} \
@@ -85,8 +85,8 @@
__4int_2str = calloc(1, sizeof(E_Ipc_4Int_2Str)); \
if (e_ipc_codec_4int_2str_dec(e->data, e->size, &(__4int_2str))) {
# define END_INT4_STRING2(__4int_2str) \
- free(__4int_2str->str1); \
- free(__4int_2str->str2); \
+ E_FREE(__4int_2str->str1); \
+ E_FREE(__4int_2str->str2); \
free(__4int_2str); \
} \
} \
@@ -103,8 +103,8 @@
__5int_2str = calloc(1, sizeof(E_Ipc_5Int_2Str)); \
if (e_ipc_codec_5int_2str_dec(e->data, e->size, &(__5int_2str))) {
# define END_INT5_STRING2(__5int_2str) \
- free(__5int_2str->str1); \
- free(__5int_2str->str2); \
+ E_FREE(__5int_2str->str1); \
+ E_FREE(__5int_2str->str2); \
free(__5int_2str); \
} \
} \
@@ -121,10 +121,10 @@
__3int_4str = calloc(1, sizeof(E_Ipc_3Int_4Str)); \
if (e_ipc_codec_3int_4str_dec(e->data, e->size, &(__3int_4str))) {
# define END_INT3_STRING4(__3int_4str) \
- free(__3int_4str->str1); \
- free(__3int_4str->str2); \
- free(__3int_4str->str3); \
- free(__3int_4str->str4); \
+ E_FREE(__3int_4str->str1); \
+ E_FREE(__3int_4str->str2); \
+ E_FREE(__3int_4str->str3); \
+ E_FREE(__3int_4str->str4); \
free(__3int_4str); \
} \
} \
@@ -142,8 +142,8 @@
__str2 = __2str_int->str2; \
__int = __2str_int->val;
# define END_STRING2_INT(__2str_int) \
- free(__2str_int->str1); \
- free(__2str_int->str2); \
+ E_FREE(__2str_int->str1); \
+ E_FREE(__2str_int->str2); \
free(__2str_int); \
} \
} \
@@ -194,7 +194,7 @@
__int3 = __str_4int->val3; \
__int4 = __str_4int->val4;
# define END_STRING_4INT(__str_4int) \
- free(__str_4int->str); \
+ E_FREE(__str_4int->str); \
free(__str_4int); \
} \
} \
@@ -375,7 +375,7 @@
E_Ipc_Str_Int *__v; \
__v = l->data;
#define END_STRING_INT_LIST(__v) \
- free(__v->str); \
+ E_FREE(__v->str); \
free(__v); \
} \
evas_list_free(dat); \
@@ -426,9 +426,9 @@
END_INT3_STRING3_LIST_START()
#define END_INT3_STRING3_LIST_ITERATE(__v) \
- free(__v->str1); \
- free(__v->str2); \
- free(__v->str3); \
+ E_FREE(__v->str1); \
+ E_FREE(__v->str2); \
+ E_FREE(__v->str3); \
free(__v); \
}
#define END_INT3_STRING3_LIST_START() \
@@ -805,9 +805,7 @@
case HDL: { void *data; int bytes = 0; \
data = e_ipc_codec_str_enc(__str, &bytes); \
ecore_ipc_client_send(e->client, E_IPC_DOMAIN_REPLY, __op, 0, 0, 0, data,
bytes); \
- if (data) { \
- free(data); \
- } \
+ E_FREE(data); \
} \
break;
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs