X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fdata_structures.c;h=acac9d72aaaaf9a15e68ad17e2a206f89d24f695;hb=ab6edc6a1a55aefe52cfd9e610b5f21ee2029544;hp=c0dafb07814fd2ece75f3fdabca6ab529f359849;hpb=0a87ec9a018cc9731ce3b04309eaa4dcc77df6d2;p=lttv.git diff --git a/lttv/lttv/sync/data_structures.c b/lttv/lttv/sync/data_structures.c index c0dafb07..acac9d72 100644 --- a/lttv/lttv/sync/data_structures.c +++ b/lttv/lttv/sync/data_structures.c @@ -46,7 +46,7 @@ const char* const approxNames[]= { [APPROXIMATE]= "Approximate", [INCOMPLETE]= "Incomplete", [ABSENT]= "Absent", - [SCREWED]= "Screwed", + [FAIL]= "Fail", }; @@ -699,7 +699,6 @@ AllFactors* createAllFactors(const unsigned int traceNb) unsigned int i, j; allFactors= malloc(sizeof(AllFactors)); - allFactors->traceNb= traceNb; allFactors->refCount= 1; allFactors->pairFactors= malloc(traceNb * sizeof(PairFactors*)); factorsArray=allFactors->pairFactors; @@ -731,13 +730,17 @@ AllFactors* createAllFactors(const unsigned int traceNb) * Free a container of PairFactors * * Args: - * traceNb: number of traces * allFactors: container of PairFactors + * traceNb: number of traces */ -void freeAllFactors(AllFactors* const allFactors) +void freeAllFactors(AllFactors* const allFactors, const unsigned int traceNb) { unsigned int i, j; - const unsigned int traceNb= allFactors->traceNb; + + if (allFactors == NULL) + { + return; + } allFactors->refCount--;