Ensure master password isn't lost after ending editline context.

This commit is contained in:
Maarten Billemont 2014-10-15 15:37:29 -04:00
parent acc1fb580b
commit a4b8d4c900

View file

@ -197,7 +197,7 @@ int main(int argc, char *const argv[]) {
EditLine *e = el_init("mpw", stdin, stdout, stderr);
int count = 0;
char *line = el_gets(e, &count);
masterPassword = strsep(&line, "\n");
masterPassword = strdup(strsep(&line, "\n"));
el_end(e);
if (count < 0) {