Changeset dd4b54d in mainline for uspace/lib/c/generic/uuid.c


Ignore:
Timestamp:
2020-04-19T15:26:53Z (4 years ago)
Author:
Manuele Conti <manuele.conti@…>
Parents:
ec506d49
Message:

Fix memory leak in uuid_format function

File:
1 edited

Legend:

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

    rec506d49 rdd4b54d  
    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.