diff --git a/src/kdmapop.c b/src/kdmapop.c index f9b72ae..a3d9969 100644 --- a/src/kdmapop.c +++ b/src/kdmapop.c @@ -154,6 +154,7 @@ int getunimap(int fd, struct unimapdesc *ud0) } if (ioctl(fd, GIO_UNIMAP, &ud)) { perror("GIO_UNIMAP"); + free(ud.entries); return -1; } if (ct != ud.entry_ct) diff --git a/src/libkeymap/common.c b/src/libkeymap/common.c index cfe8507..dfb15c0 100644 --- a/src/libkeymap/common.c +++ b/src/libkeymap/common.c @@ -246,5 +246,8 @@ int lk_free(struct lk_ctx *ctx) ctx->key_line = NULL; } + free(ctx); + ctx = NULL; + return 0; } diff --git a/src/setfont.c b/src/setfont.c index d5a577d..e1a16c4 100644 --- a/src/setfont.c +++ b/src/setfont.c @@ -327,6 +327,8 @@ do_loadfont(int fd, char *inbuf, int width, int height, int hwunit, if (putfont(fd, buf, fontsize, width, hwunit)) exit(EX_OSERR); + + free(buf); } static void