Back out "leak" fixes, as it causes segfaults
[asterisk/asterisk.git] / cli.c
diff --git a/cli.c b/cli.c
index 544ead8..ae6876f 100755 (executable)
--- a/cli.c
+++ b/cli.c
@@ -864,14 +864,12 @@ int ast_cli_generatornummatches(char *text, char *word)
 
        while ( (buf = ast_cli_generator(text, word, i)) ) {
                if (++i > 1 && strcmp(buf,oldbuf) == 0)  {
-                               free(buf);
                                continue;
                }
                oldbuf = buf;
                matches++;
        }
-       free(oldbuf);
-       free(buf);
+
        return matches;
 }