client: check for allocation errors in tab completition
This commit is contained in:
parent
c11a052955
commit
8265fe2e30
1 changed files with 1 additions and 1 deletions
2
client.c
2
client.c
|
@ -1167,7 +1167,7 @@ command_name_generator(const char *text, int state)
|
||||||
|
|
||||||
while ((name = names[tab_complete_index][list_index++])) {
|
while ((name = names[tab_complete_index][list_index++])) {
|
||||||
if (strncmp(name, text, len) == 0) {
|
if (strncmp(name, text, len) == 0) {
|
||||||
return strdup(name);
|
return Strdup(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue