X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/75cf8623d6cf8a4118e3da8e7f2ab33180f3629b..a2101157f7f6ffda8274d907bc103b63f87aebb6:/client/proxmark3.c?ds=inline

diff --git a/client/proxmark3.c b/client/proxmark3.c
index c2e70acf..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] == ' ')
@@ -168,6 +170,7 @@ static void *main_loop(void *targ) {
 					break;
 			}
 			free(cmd);
+			cmd = 0;
 		} else {
 			printf("\n");
 			break;
@@ -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;