]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/proxmark3.c
FIX: this free call still annoys Coverity Scan.
[proxmark3-svn] / client / proxmark3.c
index 70e09adacc15aba8534debd9f1443cbb45475442..edad95212e85048e612a19eb61233d79e11c63e4 100644 (file)
@@ -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] == ' ')
@@ -166,12 +168,13 @@ static void *main_loop(void *targ) {
                                // exit or quit
                                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;
Impressum, Datenschutz