友人、私は次のようにポインタ配列からメモリを解放しようとしています:
const gchar *strings[21];
strings[0]  = malloc(strAuth)
strings[0]  = strAuth
....
....
    int j=0;
    while(j < 20){
      if (strlen(strings[j]) != 0) {
    g_free((char*)strings[j]);
    g_print("Cleaned:%d\n",j);
      }
      j++;
      g_print("%d",j);
    }
//g_free((char*)strings);
j は 20 まで出力してから
$ ./mkbib 
Cleaned:0
1Cleaned:1
2Cleaned:2
34Cleaned:4
56789101112Cleaned:12
1314151617181920*** glibc detected *** ./mkbib: malloc(): memory corruption (fast): 0x0000000000a14e10 ***
(C初心者への)説明はありますか?
EDIT 1愚かな情報で申し訳ありませんが、strAuthとは何かを避けていました。これにはgtkライブラリが含まれているためです(clcで特定のライブラリに依存する質問をすることについては悪い経験があります)。したがって、実際のコードは次のようになります。
 strings[0]  = g_malloc(strlen(gtk_entry_get_text(GTK_ENTRY(e->entry1))));
 strings[0]  = gtk_entry_get_text(GTK_ENTRY(e->entry1));
where gtk_entry_get_textis of type  const gchar *
最初の投稿で時間を無駄にしてしまったかもしれません。助けてください。
編集2
const gchar *strings[21]; 
strings[0] = g_malloc(strlen(gtk_entry_get_text(GTK_ENTRY(e->entry1)))); 
strings[0] =g_strdup(gtk_entry_get_text(GTK_ENTRY(e->entry1))); 
........
int i=2; 
    while (i < 21) {
      if (strlen(strings[i]) != 0) {
    g_string_append_printf(tstring, ",\n\t%s=\"%s\"",
        keyword[i], strings[i]);
      g_free((char*)strings[i]);
      strings[i]=NULL;
      g_print("Cleaned:%d\n",i);
      } 
      i++;
 }