summaryrefslogtreecommitdiffstats
path: root/openwrt/package
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-02-26 02:32:16 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-02-26 02:32:16 +0000
commite6a8154811ab88f040bf77410f02cde203f3a41c (patch)
tree974dde8f6003d98e97764410cbbbe1ccfe6b5138 /openwrt/package
parent7cef27d7518e984db79e1025bb0e2927b940ec68 (diff)
bugfix
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@294 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package')
-rw-r--r--openwrt/package/openwrt/jffs2root.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openwrt/package/openwrt/jffs2root.c b/openwrt/package/openwrt/jffs2root.c
index e74c89a9b..2ff37fdad 100644
--- a/openwrt/package/openwrt/jffs2root.c
+++ b/openwrt/package/openwrt/jffs2root.c
@@ -48,7 +48,10 @@ void init_crc32()
unsigned long crc;
unsigned long poly = 0xEDB88320L;
int n, bit;
- crc32 = (unsigned long *) malloc(256 * sizeof(unsigned long));
+ if ((crc32 = (unsigned long *) malloc(256 * sizeof(unsigned long))) == (void *)-1) {
+ perror("malloc");
+ exit(1);
+ }
for (n = 0; n < 256; n++) {
crc = (unsigned long) n;
for (bit = 0; bit < 8; bit++)