diff options
author | Mike Baker <mbm@openwrt.org> | 2005-02-26 02:32:16 +0000 |
---|---|---|
committer | Mike Baker <mbm@openwrt.org> | 2005-02-26 02:32:16 +0000 |
commit | 26da6c04c9daed3a7f9a3f7ccf67a5e89d7f29bb (patch) | |
tree | 3dff87c9cbbaa53f93351a41bdf920c299597639 /package | |
parent | 62ed4966b1eb1294c2c79f8d3dc85263ec9a5bb4 (diff) | |
download | upstream-26da6c04c9daed3a7f9a3f7ccf67a5e89d7f29bb.tar.gz upstream-26da6c04c9daed3a7f9a3f7ccf67a5e89d7f29bb.tar.bz2 upstream-26da6c04c9daed3a7f9a3f7ccf67a5e89d7f29bb.zip |
bugfix
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@294 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/openwrt/jffs2root.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/openwrt/jffs2root.c b/package/openwrt/jffs2root.c index e74c89a9ba..2ff37fdad3 100644 --- a/package/openwrt/jffs2root.c +++ b/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++) |