[Motiftools-xmt-cvs] CVS: xmt/Xmt LayoutGadget.c,1.2,1.3
Brought to you by:
motiftools
From: Grant M. <grm...@us...> - 2003-10-25 00:48:09
|
Update of /cvsroot/motiftools/xmt/Xmt In directory sc8-pr-cvs1:/tmp/cvs-serv8670 Modified Files: LayoutGadget.c Log Message: Fix memory leak Index: LayoutGadget.c =================================================================== RCS file: /cvsroot/motiftools/xmt/Xmt/LayoutGadget.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** LayoutGadget.c 19 Sep 2001 02:57:18 -0000 1.2 --- LayoutGadget.c 25 Oct 2003 00:42:44 -0000 1.3 *************** *** 10,13 **** --- 10,16 ---- * * $Log$ + * Revision 1.3 2003/10/25 00:42:44 grmcdorman + * Fix memory leak + * * Revision 1.2 2001/09/19 02:57:18 grmcdorman * This change makes the following modifications: *************** *** 222,228 **** #if XmVersion >= 1002 /* always inherit the base class extension. - * We assume that there aren't any other extension records. */ ! roc->rect_class.extension = (XtPointer)&baseClassExt; #endif } --- 225,239 ---- #if XmVersion >= 1002 /* always inherit the base class extension. */ ! if (roc->rect_class.extension != NULL) { ! /* There is another extension. */ ! XmBaseClassExt copy; ! copy = XtNew(XmBaseClassExtRec); ! memcpy(copy, &baseClassExt, sizeof *copy); ! copy->next_extension = roc->rect_class.extension; ! roc->rect_class.extension = copy; ! } else { ! roc->rect_class.extension = (XtPointer)&baseClassExt; ! } #endif } |