unixDie("write to thread pipe returned wrong size or error");
}
- string* resp;
+ string* resp = nullptr;
if(read(tps.readFromThread, &resp, sizeof(resp)) != sizeof(resp))
unixDie("read from thread pipe returned wrong size or error");
if(resp) {
// cerr <<"got response: " << *resp << endl;
delete resp;
+ resp = nullptr;
}
}
}
unixDie("write to thread pipe returned wrong size or error");
}
- T* resp;
+ T* resp = nullptr;
if(read(tps.readFromThread, &resp, sizeof(resp)) != sizeof(resp))
unixDie("read from thread pipe returned wrong size or error");
//~ cerr <<"got response: " << *resp << endl;
ret += *resp;
delete resp;
+ resp = nullptr;
}
}
return ret;