Added a check for the case malloc() returns NULL.
Signed-off-by: Eduard - Gabriel Munteanu <[email protected]>
---
jit/fixup-site.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/jit/fixup-site.c b/jit/fixup-site.c
index 77a3351..0d38d8a 100644
--- a/jit/fixup-site.c
+++ b/jit/fixup-site.c
@@ -34,6 +34,9 @@ struct fixup_site *alloc_fixup_site(void)
struct fixup_site *site;
site = malloc(sizeof(*site));
+ if (!site)
+ return NULL;
+
memset(site, 0, sizeof(*site));
return site;
--
1.6.0.6
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel