From: joela AT umn DOT edu (Joel Anderson) Subject: malloc()/free() help,please 24 Nov 1998 07:21:14 -0800 Message-ID: <19981123185217.19555.qmail.cygnus.gnu-win32@findmail.com> To: gnu-win32 AT cygnus DOT com Overall I really,really like this package! (OTOH plain text man pages, or a simple man tool would REALLY be good....) But I have a small problem. A simple tool I wrote that works find on Unix is blowing up in free(): This reads in a dictionary "filename", constructed of "Lanuage-A", "Language-B" pairs. I want to be able to call the program and reload the dictionary at will, however the third time (not the first, or the second) it blows up doing a free() - not in Unix, only in the cygwin gcc compiled version on my W95 box: Any thoughts: int read_dict(char *filename){ FILE *RD; int x; char *ecop,*gcop; for (x=0;x%s< / E: >%s<\n",g,e);*/ ecop = (char*)malloc(strlen(e)); gcop = (char*)malloc(strlen(g)); strcpy(ecop,e); strcpy(gcop,g); voc[wcount][ENG]=ecop; voc[wcount][GAL]=gcop; wcount++; } } return wcount; } - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".