Date: Wed, 25 Feb 2015 09:57:05 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279275 - head/sys/boot/fdt Message-ID: <201502250957.t1P9v5hU004973@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Feb 25 09:57:05 2015 New Revision: 279275 URL: https://svnweb.freebsd.org/changeset/base/279275 Log: Fix potential NULL dereference. Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 2 weeks Modified: head/sys/boot/fdt/fdt_loader_cmd.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Wed Feb 25 09:21:59 2015 (r279274) +++ head/sys/boot/fdt/fdt_loader_cmd.c Wed Feb 25 09:57:05 2015 (r279275) @@ -1299,13 +1299,12 @@ fdt_merge_strings(int argc, char *argv[] sz += argc - start; buf = (char *)malloc(sizeof(char) * sz); - bzero(buf, sizeof(char) * sz); - if (buf == NULL) { sprintf(command_errbuf, "could not allocate space " "for string"); return (1); } + bzero(buf, sizeof(char) * sz); idx = 0; for (i = start, idx = 0; i < argc; i++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502250957.t1P9v5hU004973>