Back out "leak" fixes, as it causes segfaults
[asterisk/asterisk.git] / asterisk.c
index 29c1645..8e64773 100755 (executable)
@@ -949,7 +949,6 @@ static char *cli_complete(EditLine *el, int ch)
 
        if (matches) {
                int i;
-               int x;
                int matches_num, maxlen, match_len;
 
                if (matches[0][0] != '\0') {
@@ -979,10 +978,6 @@ static char *cli_complete(EditLine *el, int ch)
                                retval = CC_REFRESH;
                        }
                }
-       for (x=0; matches[x]; x++) {
-               free(matches[x]);
-               matches[x] = NULL;
-       }
        free(matches);
        }