Use xmalloc() instead of malloc().
This commit is contained in:
parent
7787ace61a
commit
f33c6c6602
1 changed files with 1 additions and 1 deletions
|
@ -297,7 +297,7 @@ cmd_expand(char *cmd)
|
||||||
puts("No such command.");
|
puts("No such command.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
b = malloc(strlen(n->cmd->command) + strlen(args) + 1);
|
b = xmalloc(strlen(n->cmd->command) + strlen(args) + 1);
|
||||||
sprintf(b, "%s%s", n->cmd->command, args);
|
sprintf(b, "%s%s", n->cmd->command, args);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue