dont crash if no storage is specified (or if open() failed)
This commit is contained in:
parent
a58215869e
commit
d486abcb84
1 changed files with 3 additions and 2 deletions
5
buffer.c
5
buffer.c
|
@ -187,8 +187,9 @@ pkt_store(th_pkt_t *pkt)
|
|||
storage_mem_enq(pkt);
|
||||
storage_disk_enq(pkt);
|
||||
|
||||
pwrite(pkt->pkt_storage->ts_fd, pkt->pkt_payload, pkt->pkt_payloadlen,
|
||||
pkt->pkt_storage_offset);
|
||||
if(pkt->pkt_storage)
|
||||
pwrite(pkt->pkt_storage->ts_fd, pkt->pkt_payload, pkt->pkt_payloadlen,
|
||||
pkt->pkt_storage_offset);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue