Skip to content

Commit

Permalink
- YAM.c: replaced calloc()/free() calls for the TimerIO requests
Browse files Browse the repository at this point in the history
  with better conforming AllocMem()/FreeMem() calls, because
  TimerIO requests need to be MEMF_PUBLIC allocated according to
  Gunther.
  • Loading branch information
jens-maus committed Apr 25, 2003
1 parent 0f34285 commit 4d4e4f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions yamos/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ $Source$
where YAM didn`t correctly undo a specific part and put the
wrong filename string in previous moved parts. This caused
that some multipart attachments weren`t accessable.
* YAM.c: replaced calloc()/free() calls for the TimerIO requests
with better conforming AllocMem()/FreeMem() calls, because
TimerIO requests need to be MEMF_PUBLIC allocated according to
Gunther.

2003-04-22 Jens Langner <[email protected]>

Expand Down
4 changes: 2 additions & 2 deletions yamos/YAM.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static void TC_Exit(void)
if((ioreq = &TCData.timerIO[i]->tr_node))
{
if(i==0) DeleteIORequest(ioreq);
else free(ioreq);
else FreeMem(ioreq, sizeof(struct timerequest));

TCData.timerIO[i] = NULL;
}
Expand Down Expand Up @@ -227,7 +227,7 @@ static BOOL TC_Init(void)
// create our other TimerIOs now
for(i=1; i < TIO_NUM; i++)
{
if(!(TCData.timerIO[i] = calloc(1, sizeof(struct timerequest)))) return FALSE;
if(!(TCData.timerIO[i] = AllocMem(sizeof(struct timerequest), MEMF_PUBLIC|MEMF_CLEAR))) return FALSE;

// then copy the data of our timerIO[0] to the other ones
memcpy(TCData.timerIO[i], TCData.timerIO[0], sizeof(struct timerequest));
Expand Down

0 comments on commit 4d4e4f7

Please sign in to comment.