[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [fricas-devel] Re: A small error in discardGraph()
From: |
Martin Rubey |
Subject: |
[Axiom-developer] Re: [fricas-devel] Re: A small error in discardGraph() |
Date: |
14 Dec 2007 08:43:30 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Waldek Hebisch <address@hidden> writes:
> Martin Rubey wrote:
> >
> > Martin Rubey <address@hidden> writes:
> >
> > > Gregory Vanuxem <address@hidden> writes:
> > >
> > > > Hello,
> > > >
> > > > Here is a patchlet that needs to be reviewed. It fixes a bug in the
> > > > function 'discardGraph' (src/graph/viewman/makeGraph.c). This bug is
> > > > triggered when closing a view2D window [see the end of this email].
> > >
> > > Super!
> >
> > Waldek, would you mind if I commit this?
> >
>
> Please go on. But AFAICS the same error appears also in 'freeGraph'
> (in src/graph/view2D/graph2d.c.pamphlet) -- we should corrent this
> one too.
Waldek, I do not understand C. Thus, I can only patch by analogy... Greg
supplied:
@@ -144,7 +144,7 @@
for (j=0, pL=theGraph->listOfListsOfPoints;
j<theGraph->numberOfLists; j++,pL++)
free(pL->listOfPoints);
- free(pL);
+ free(theGraph->listOfListsOfPoints);
free(theGraph);
}
So I try to guess
void
freeGraph(int i)
{
int j;
pointListStruct *llPtr;
if (graphArray[i].key) {
graphArray[i].key = 0; /* 0 means no graph */
for (j=0,llPtr=graphArray[i].listOfListsOfPoints;
j<graphArray[i].numberOfLists; j++,llPtr++)
free(llPtr->listOfPoints);
- free(llPtr);
+ ???????????
free(xPointsArray[i].xPoint);
} else {
}
}
but I can't.
Help!
Martin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] Re: [fricas-devel] Re: A small error in discardGraph(),
Martin Rubey <=