Sign in
nest-open-source
/
nest-learning-thermostat
/
5.1
/
tftp-hpa
/
15ffff21f1ac37412128a49f7fbd4ed2fdb6add0
/
.
/
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
;
}