summaryrefslogtreecommitdiff
path: root/sys/src/9/port/rebootcmd.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-12-12 19:17:58 +0100
committercinap_lenrek <cinap_lenrek@centraldogma>2011-12-12 19:17:58 +0100
commit8cb8043d0ebeadb0d424fb1051a49573430322a3 (patch)
tree3bb91278b127dce9ebf0d30975bc7197ac2765a8 /sys/src/9/port/rebootcmd.c
parent304ee3b2b55971d9f5f820511fb9cdadcb77b818 (diff)
kernel: fix more malloc/smalloc errors
Diffstat (limited to 'sys/src/9/port/rebootcmd.c')
-rw-r--r--sys/src/9/port/rebootcmd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/src/9/port/rebootcmd.c b/sys/src/9/port/rebootcmd.c
index 591864903..6c6adf95b 100644
--- a/sys/src/9/port/rebootcmd.c
+++ b/sys/src/9/port/rebootcmd.c
@@ -38,10 +38,7 @@ setbootcmd(int argc, char *argv[])
char *buf, *p, *ep;
int i;
- buf = malloc(1024);
- if(buf == nil)
- error(Enomem);
- p = buf;
+ p = buf = smalloc(1024);
ep = buf + 1024;
for(i=0; i<argc; i++)
p = seprint(p, ep, "%q ", argv[i]);