VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Jim Meyering <jim@meyering.net> 2008-04-29 00:59:09 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2008-04-29 08:06:02 -0700 commit: 22caa0417db3b1d3dfafc9b7c0bf31baf8d667e7 parent: cd6fda36089cf3b450821228c2f575a3b5d0e7a7
Commit Summary:
lib/inflate.c: handle failed malloc()
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/lib/inflate.c b/lib/inflate.c
index 845f91d3ac12..9762294be062 100644
--- a/lib/inflate.c
+++ b/lib/inflate.c
@@ -811,6 +811,9 @@ DEBG("<dyn");
   ll = malloc(sizeof(*ll) * (286+30));  /* literal/length and distance code lengths */
 #endif
 
+  if (ll == NULL)
+    return 1;
+
   /* make local bit buffer */
   b = bb;
   k = bk;