diff options
-rw-r--r-- | src/fuse/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fuse/main.c b/src/fuse/main.c index 4f8f857..eb4566a 100644 --- a/src/fuse/main.c +++ b/src/fuse/main.c @@ -318,9 +318,11 @@ int main(int argc, char *argv[]) logInfo.receivedBytes = 0; logInfo.imageSize = imageSize; logInfo.imageBlockCount = ( imageSize + 4095 ) / 4096; - uint8_t tmpShrt[logInfo.imageBlockCount]; - memset( tmpShrt, 0, sizeof tmpShrt ); - logInfo.blockRequestCount = tmpShrt; + if ( useDebug ) { + logInfo.blockRequestCount = calloc( logInfo.imageBlockCount, sizeof(uint8_t) ); + } else { + logInfo.blockRequestCount = NULL; + } // Since dnbd3 is always read only and the remote image will not change newArgv[newArgc++] = "-o"; |