CA memory leak at ca_task_exit()

This commit is contained in:
Janet B. Anderson
1993-12-18 11:00:47 +00:00
parent 9e84f3f710
commit 98c245012f
2 changed files with 52 additions and 0 deletions

View File

@@ -28,6 +28,7 @@
* Modification Log:
* -----------------
* .01 091493 joh fixed overzealous parameter check
* .02 121693 joh added bucketFree()
*/
@@ -169,11 +170,36 @@ unsigned indexWidth;
pb->nEntries,
sizeof(ITEMPTR));
if(!pb->pTable){
free(pb);
return NULL;
}
return pb;
}
/*
* bucketFree()
*/
#ifdef __STDC__
int bucketFree(BUCKET *prb)
#else
int bucketFree(prb)
BUCKET *prb;
#endif
{
/*
* deleting a bucket with entries in use
* will cause memory leaks and is not allowed
*/
if(prb->nInUse){
return BUCKET_FAILURE;
}
free(prb->pTable);
free(prb);
return BUCKET_SUCCESS;
}
/*

View File

@@ -28,6 +28,7 @@
* Modification Log:
* -----------------
* .01 091493 joh fixed overzealous parameter check
* .02 121693 joh added bucketFree()
*/
@@ -169,11 +170,36 @@ unsigned indexWidth;
pb->nEntries,
sizeof(ITEMPTR));
if(!pb->pTable){
free(pb);
return NULL;
}
return pb;
}
/*
* bucketFree()
*/
#ifdef __STDC__
int bucketFree(BUCKET *prb)
#else
int bucketFree(prb)
BUCKET *prb;
#endif
{
/*
* deleting a bucket with entries in use
* will cause memory leaks and is not allowed
*/
if(prb->nInUse){
return BUCKET_FAILURE;
}
free(prb->pTable);
free(prb);
return BUCKET_SUCCESS;
}
/*