I have a function that takes a pointer to a char ** and fills it with strings (an array of strings I guess). *list_of_strings* is allocated memory inside the function.
won't that just free the actual pointers and not the memory each string itself was using?
Yes, indeed.
How do I completely free the memory
By looping through the array and freeing each string one by one before freeing up the array itself. E.g.
for (i = 0; i < SOMETHING; i++) {
free(list[i]);
}
free(list);