Not sure if it's the case, but:
When a structure have to contain a variable length C string (that won't change after initialization), then instead of writing:
struct x {
int key;
const char* s;
};
when we'll need two malloc
's (one for struct, and one for string), we can write
struct X2 {
int key;
char s[1];
}x2;
// and use it like
x2* tmp = (x2*)malloc(sizeof(x2) + strlen(str));
Here we have only one malloc
for both, structure and the string.
When the last atribute of a structure is an array, then by allocating variable space for the structure we can allocate it with variable number of such members. I think this happens in your case.