X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/aacb96d7ed1723663fddd4e2611c22c971442cbd..9d590832a18fd34abd2c7966f14a30f58e87e1a1:/client/proxmark3.c diff --git a/client/proxmark3.c b/client/proxmark3.c index 70e09ada..0fa55425 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -154,6 +154,8 @@ static void *main_loop(void *targ) { cmd = readline(PROXPROMPT); } + // this one should pick up all non-null cmd... + // why is there a if (cmd) { while(cmd[strlen(cmd) - 1] == ' ') @@ -167,11 +169,12 @@ static void *main_loop(void *targ) { if (ret == 99) break; } + free(cmd); + cmd = 0; } else { printf("\n"); break; } - free(cmd); } if (script_file) { @@ -182,6 +185,7 @@ static void *main_loop(void *targ) { write_history(".history"); free(cmd); + cmd = 0; if (arg->usb_present == 1) { rarg.run = 0;