]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: this free call still annoys Coverity Scan.
authoriceman1001 <iceman@iuse.se>
Fri, 19 Feb 2016 21:31:35 +0000 (22:31 +0100)
committericeman1001 <iceman@iuse.se>
Fri, 19 Feb 2016 21:31:35 +0000 (22:31 +0100)
client/proxmark3.c

index c2e70acfd0b3c77344e5099eae22a9b0043b592e..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,8 +168,9 @@ static void *main_loop(void *targ) {
                                // exit or quit
                                if (ret == 99) 
                                        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;
Impressum, Datenschutz