diff --git a/MasterPassword/C/mpw.c b/MasterPassword/C/mpw.c index 51e5a312..df723a74 100644 --- a/MasterPassword/C/mpw.c +++ b/MasterPassword/C/mpw.c @@ -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) {