1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

r26453: Janitorial: Don't use a static char[] in smb_readline_replacement.

Fix up callers to free the memory returned, as that is needed if we use the
original readline function as well.
(This used to be commit c81ead1c38)
This commit is contained in:
Kai Blin
2007-12-14 14:04:56 +01:00
committed by Stefan Metzmacher
parent d8feba9faf
commit 43ac3d9b44
5 changed files with 19 additions and 6 deletions

View File

@ -546,12 +546,16 @@ int main(int argc, char **argv)
via readline :-( */
line = smb_readline(prompt, NULL, reg_completion);
if (line == NULL)
if (line == NULL) {
free(prompt);
break;
}
if (line[0] != '\n') {
ret = W_ERROR_IS_OK(process_cmd(ctx, line));
}
free(line);
free(prompt);
}
talloc_free(ctx);