git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26d7c33
)
InitEvent now returns NULL if calloc fails
author
Jan Pospíšil
<honik@ntc.zcu.cz>
Thu, 8 Jun 2006 13:57:09 +0000
(13:57 +0000)
committer
Jan Pospíšil
<honik@ntc.zcu.cz>
Thu, 8 Jun 2006 13:57:09 +0000
(13:57 +0000)
org.glite.lb.common/src/events.c.T
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lb.common/src/events.c.T
b/org.glite.lb.common/src/events.c.T
index
4ceee87
..
4de3c32
100644
(file)
--- a/
org.glite.lb.common/src/events.c.T
+++ b/
org.glite.lb.common/src/events.c.T
@@
-252,11
+252,12
@@
edg_wll_Event *edg_wll_InitEvent(
edg_wll_EventCode eventcode /* eventcode IN */
)
{
-edg_wll_Event *event;
+edg_wll_Event *event
=NULL
;
/* allocate memory for 'event' (edg_wll_Event); use calloc to also clean it */
-/* FIXME: what if calloc fails? should be checked somehow -> nomem etc. */
event = (edg_wll_Event *) calloc(1,sizeof(edg_wll_Event));
+ if (event == NULL) return event;
+
event->type = eventcode;
/* initialize common fields */
@@@{