From 95215e873f969f76a3e028c975342c8d3be48bff Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 19 Feb 2016 22:31:35 +0100 Subject: [PATCH] FIX: this free call still annoys Coverity Scan. --- client/proxmark3.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/proxmark3.c b/client/proxmark3.c index c2e70acf..edad9521 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] == ' ') @@ -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; -- 2.39.2