X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2FFBSD%2Fosi_sleep.c;h=b70d3c4a9926c1128a4ab81c75a09e6c5644c15f;hp=8a5bb6c555a91b43a1453691cf3a3594929328c1;hb=c9a4e11bbac143f7e44af4eb1e6fae1653679e33;hpb=d9cf88428aa542d1cd304e82f02333eced0194ae diff --git a/src/afs/FBSD/osi_sleep.c b/src/afs/FBSD/osi_sleep.c index 8a5bb6c..b70d3c4 100644 --- a/src/afs/FBSD/osi_sleep.c +++ b/src/afs/FBSD/osi_sleep.c @@ -138,7 +138,9 @@ afs_getevent(char *event) evp = evp->next; } if (!newp) { - newp = (afs_event_t *) osi_AllocSmallSpace(sizeof(afs_event_t)); + newp = osi_AllocSmallSpace(sizeof(afs_event_t)); + newp->lck = osi_AllocSmallSpace(sizeof(struct mtx)); + memset(newp->lck, 0, sizeof(struct mtx)); afs_evhashcnt++; newp->next = afs_evhasht[hashcode]; afs_evhasht[hashcode] = newp; @@ -247,6 +249,7 @@ shutdown_osisleep(void) { if (evp->refcount == 0) { EVTLOCK_DESTROY(evp); *pevpp = evp->next; + osi_FreeSmallSpace(evp->lck); osi_FreeSmallSpace(evp); afs_evhashcnt--; } else {