Diff for /qemu/block-dmg.c between versions 1.1.1.4 and 1.1.1.5

version 1.1.1.4, 2018/04/24 16:47:05 version 1.1.1.5, 2018/04/24 16:50:18
Line 125  dmg_close: Line 125  dmg_close:
                 goto dmg_close;                  goto dmg_close;
             chunk_count = (count-204)/40;              chunk_count = (count-204)/40;
             new_size = sizeof(uint64_t) * (s->n_chunks + chunk_count);              new_size = sizeof(uint64_t) * (s->n_chunks + chunk_count);
             s->types = realloc(s->types, new_size/2);              s->types = qemu_realloc(s->types, new_size/2);
             s->offsets = realloc(s->offsets, new_size);              s->offsets = qemu_realloc(s->offsets, new_size);
             s->lengths = realloc(s->lengths, new_size);              s->lengths = qemu_realloc(s->lengths, new_size);
             s->sectors = realloc(s->sectors, new_size);              s->sectors = qemu_realloc(s->sectors, new_size);
             s->sectorcounts = realloc(s->sectorcounts, new_size);              s->sectorcounts = qemu_realloc(s->sectorcounts, new_size);
   
             for(i=s->n_chunks;i<s->n_chunks+chunk_count;i++) {              for(i=s->n_chunks;i<s->n_chunks+chunk_count;i++) {
                 s->types[i] = read_uint32(s->fd);                  s->types[i] = read_uint32(s->fd);
Line 159  dmg_close: Line 159  dmg_close:
     }      }
   
     /* initialize zlib engine */      /* initialize zlib engine */
     if(!(s->compressed_chunk = malloc(max_compressed_size+1)))      s->compressed_chunk = qemu_malloc(max_compressed_size+1);
         goto dmg_close;      s->uncompressed_chunk = qemu_malloc(512*max_sectors_per_chunk);
     if(!(s->uncompressed_chunk = malloc(512*max_sectors_per_chunk)))  
         goto dmg_close;  
     if(inflateInit(&s->zstream) != Z_OK)      if(inflateInit(&s->zstream) != Z_OK)
         goto dmg_close;          goto dmg_close;
   
Line 294  BlockDriver bdrv_dmg = { Line 292  BlockDriver bdrv_dmg = {
     NULL,      NULL,
     dmg_close,      dmg_close,
 };  };
   

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.5


unix.superglobalmegacorp.com