Sign in
nest-open-source
/
nest-learning-thermostat
/
5.0.2
/
tftp-hpa
/
9ff303d2392d4001e76f6211ad80bfb1b54510c6
/
.
/
tftp-hpa-5.0
/
lib
/
xmalloc.c
blob: 30704f31804754a65c706f12ea1b395723c2c5da [
file
] [
log
] [
blame
]
/*
* xmalloc.c
*
* Simple error-checking version of malloc()
*
*/
#include
"config.h"
void
*
xmalloc
(
size_t
size
)
{
void
*
p
=
malloc
(
size
);
if
(!
p
)
{
fprintf
(
stderr
,
"Out of memory!\n"
);
exit
(
128
);
}
return
p
;
}