Convert most dynamic allocations to use functions from xmalloc.h

This commit is contained in:
Craig Barnes 2020-08-08 20:34:30 +01:00
parent ecb2695822
commit 7a77958ba2
21 changed files with 133 additions and 68 deletions

View file

@ -10,6 +10,7 @@
#define LOG_ENABLE_DBG 0
#include "log.h"
#include "tllist.h"
#include "xmalloc.h"
struct reaper {
struct fdm *fdm;
@ -39,7 +40,7 @@ reaper_init(struct fdm *fdm)
return NULL;
}
struct reaper *reaper = malloc(sizeof(*reaper));
struct reaper *reaper = xmalloc(sizeof(*reaper));
*reaper = (struct reaper){
.fdm = fdm,
.fd = fd,