]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/proxmark3.c
CHG: updated the downloaded release from v1.4.0 -> v1.5.0
[proxmark3-svn] / client / proxmark3.c
index 70e09adacc15aba8534debd9f1443cbb45475442..0fa554259425274419a0f45bc0836c04ad257259 100644 (file)
@@ -154,6 +154,8 @@ static void *main_loop(void *targ) {
                        cmd = readline(PROXPROMPT);
                }
                
                        cmd = readline(PROXPROMPT);
                }
                
+               // this one should pick up all non-null cmd...
+               // why is there a 
                if (cmd) {
 
                        while(cmd[strlen(cmd) - 1] == ' ')
                if (cmd) {
 
                        while(cmd[strlen(cmd) - 1] == ' ')
@@ -167,11 +169,12 @@ static void *main_loop(void *targ) {
                                if (ret == 99) 
                                        break;
                        }
                                if (ret == 99) 
                                        break;
                        }
+                       free(cmd);
+                       cmd = 0;
                } else {
                        printf("\n");
                        break;
                }
                } else {
                        printf("\n");
                        break;
                }
-               free(cmd);
        }
 
        if (script_file) {
        }
 
        if (script_file) {
@@ -182,6 +185,7 @@ static void *main_loop(void *targ) {
        write_history(".history");
 
        free(cmd);
        write_history(".history");
 
        free(cmd);
+       cmd = 0;
                        
        if (arg->usb_present == 1) {
                rarg.run = 0;
                        
        if (arg->usb_present == 1) {
                rarg.run = 0;
Impressum, Datenschutz