Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 88ab6e9 in mainline


Ignore:
Timestamp:
2016-04-02T06:48:20Z (4 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
2f2dd126
Parents:
4a0bc99
git-author:
Manuele Conti <conti.manuele@…> (2016-04-02 06:48:20)
git-committer:
Jakub Jermar <jakub@…> (2016-04-02 06:48:20)
Message:

Fix a memory leak in mkmfs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkmfs/mkmfs.c

    r4a0bc99 r88ab6e9  
    640640        zbmap_buf = malloc(zbmap_nblocks * sb->block_size);
    641641
    642         if (!ibmap_buf || !zbmap_buf)
    643                 return ENOMEM;
     642        if (!ibmap_buf || !zbmap_buf) {
     643                rc = ENOMEM;
     644                goto exit;
     645        }
    644646
    645647        memset(ibmap_buf, 0xFF, ibmap_nblocks * sb->block_size);
     
    671673        }
    672674
     675exit:
    673676        free(ibmap_buf);
    674677        free(zbmap_buf);
Note: See TracChangeset for help on using the changeset viewer.