13
0

catch OOM

This commit is contained in:
Robin Gareus 2014-03-23 02:18:49 +01:00
parent 23f285f126
commit dbcf22a832

View File

@ -148,7 +148,13 @@ Worker::run()
if (size > buf_size) {
buf = realloc(buf, size);
if (buf) {
buf_size = size;
} else {
PBD::error << "Worker: Error allocating memory"
<< endmsg;
buf_size = 0; // TODO: This is probably fatal
}
}
if (_requests->read((uint8_t*)buf, size) < size) {