It looks like the first loop that does the "pre-allocation" may have an error. The following allocation:
AllCurrentData[newLineCOunt].data = malloc(COLUMNS * sizeof(char));
should, I believe, be this:
AllCurrentData[newLineCOunt].data = malloc(COLUMNS * sizeof(char*));