Changeset d6c4d40 in mainline for uspace/lib/congfx/src/console.c


Ignore:
Timestamp:
2021-03-05T11:23:31Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f73a8e3
Parents:
87822ce
git-author:
Jiri Svoboda <jiri@…> (2021-03-04 20:22:52)
git-committer:
Jiri Svoboda <jiri@…> (2021-03-05 11:23:31)
Message:

Do not forget to clean up when exiting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/congfx/src/console.c

    r87822ce rd6c4d40  
    137137        sysarg_t rows;
    138138        sysarg_t cols;
    139         charfield_t *buf;
     139        charfield_t *buf = NULL;
    140140        errno_t rc;
    141141
     
    149149        if (rc != EOK)
    150150                goto error;
     151
     152        console_clear(con);
    151153
    152154        rc = console_map(con, cols, rows, &buf);
     
    170172        return EOK;
    171173error:
     174        if (buf != NULL)
     175                console_unmap(cgc->con, buf);
    172176        if (cgc != NULL)
    173177                free(cgc);
     
    187191        if (rc != EOK)
    188192                return rc;
     193
     194        console_clear(cgc->con);
     195        console_unmap(cgc->con, cgc->buf);
    189196
    190197        free(cgc);
Note: See TracChangeset for help on using the changeset viewer.