[patch] sys/boot/fdt/fdt_loader_cmd.c
Dmitry Luhtionov
dmitryluhtionov at gmail.com
Fri Feb 20 21:59:14 UTC 2015
--- sys/boot/fdt/fdt_loader_cmd.c.orig 2015-02-04 10:06:18.000000000 +0200
+++ sys/boot/fdt/fdt_loader_cmd.c 2015-02-20 23:50:26.000000000 +0200
@@ -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++) {
More information about the freebsd-current
mailing list