This is not correct. You free what you malloc, nothing else.
In your case you have to do:


for (int i=0; i++; i < MAX_CONS)
free (scripts[i]);

When you release a pointer on a struct...