diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | runtime/queue.c | 9 |
2 files changed, 8 insertions, 3 deletions
@@ -1,5 +1,7 @@ --------------------------------------------------------------------------- Version 5.8.10 [V5-stable] 2012-??-?? +- bugfix: segfault if disk-queue was started up with old queue file + Thanks to Tomas Heinrich for the patch. - bugfix: memory leak in array passing output module mode --------------------------------------------------------------------------- Version 5.8.9 [V5-stable] 2012-03-15 diff --git a/runtime/queue.c b/runtime/queue.c index 621a4eed..137c9547 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -2018,13 +2018,16 @@ static rsRetVal qqueuePersist(qqueue_t *pThis, int bIsCheckpoint) CHKiRet(obj.EndSerialize(psQIF)); /* now persist the stream info */ - CHKiRet(strm.Serialize(pThis->tVars.disk.pWrite, psQIF)); - CHKiRet(strm.Serialize(pThis->tVars.disk.pReadDel, psQIF)); + if(pThis->tVars.disk.pWrite != NULL) + CHKiRet(strm.Serialize(pThis->tVars.disk.pWrite, psQIF)); + if(pThis->tVars.disk.pReadDel != NULL) + CHKiRet(strm.Serialize(pThis->tVars.disk.pReadDel, psQIF)); /* tell the input file object that it must not delete the file on close if the queue * is non-empty - but only if we are not during a simple checkpoint */ - if(bIsCheckpoint != QUEUE_CHECKPOINT) { + if(bIsCheckpoint != QUEUE_CHECKPOINT + && pThis->tVars.disk.pReadDel != NULL) { CHKiRet(strm.SetbDeleteOnClose(pThis->tVars.disk.pReadDel, 0)); } |