Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22caa041 authored by Jim Meyering's avatar Jim Meyering Committed by Linus Torvalds
Browse files

lib/inflate.c: handle failed malloc()



lib/inflate.c (inflate_dynamic): Don't deref NULL upon failed malloc.

Signed-off-by: default avatarJim Meyering <meyering@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cd6fda36
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;