Nullcheck *before* dereferencing.
Also bracketing, replacing a lost comment, and some variable naming.
This commit is contained in:
@@ -412,6 +412,8 @@ void client_reply_to_write( struct client* client, struct nbd_request request )
|
||||
}
|
||||
else {
|
||||
debug("No allocation map, writing directly.");
|
||||
/* If we get cut off partway through reading this data:
|
||||
* */
|
||||
ERROR_IF_NEGATIVE(
|
||||
readloop( client->socket,
|
||||
client->mapped + request.from,
|
||||
|
Reference in New Issue
Block a user