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

Changeset 11e4856 in mainline


Ignore:
Timestamp:
2020-04-21T14:03:16Z (5 weeks ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
2a09dcb
Parents:
ec506d49
git-author:
Manuele Conti <manuele.conti@…> (2020-04-19 15:26:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2020-04-21 14:03:16)
Message:

Fix memory leak in uuid_format function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/uuid.c

    rec506d49 r11e4856  
    189189        int ret = snprintf(str, size, format, uuid->b[0], uuid->b[1], uuid->b[2], uuid->b[3], uuid->b[4], uuid->b[5], uuid->b[6], uuid->b[7], uuid->b[8], uuid->b[9], uuid->b[10], uuid->b[11], uuid->b[12], uuid->b[13], uuid->b[14], uuid->b[15]);
    190190
    191         if (ret != 36)
    192                 return EINVAL;
     191        if (ret != 36) {
     192                free(str);
     193                return EINVAL;
     194        }
    193195
    194196        *rstr = str;
Note: See TracChangeset for help on using the changeset viewer.