diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-09 21:12:20 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-09 21:12:20 +0000 |
commit | dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5 (patch) | |
tree | 0af32db840a032a50312791977b7d129def1d5b3 /nuttx/graphics/nxmu/nxmu_kbdin.c | |
parent | 2ac33dcffabd9422659c3b013ed8624c09ae90e4 (diff) | |
download | px4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.tar.gz px4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.tar.bz2 px4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.zip |
More changes for a kernel-mode allocator (more to be done)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5724 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxmu/nxmu_kbdin.c')
-rw-r--r-- | nuttx/graphics/nxmu/nxmu_kbdin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nuttx/graphics/nxmu/nxmu_kbdin.c b/nuttx/graphics/nxmu/nxmu_kbdin.c index 0308c2bfa..f156a4151 100644 --- a/nuttx/graphics/nxmu/nxmu_kbdin.c +++ b/nuttx/graphics/nxmu/nxmu_kbdin.c @@ -44,7 +44,9 @@ #include <errno.h> #include <debug.h> +#include <nuttx/kmalloc.h> #include <nuttx/nx/nx.h> + #include "nxfe.h" #ifdef CONFIG_NX_KBD @@ -94,7 +96,7 @@ void nxmu_kbdin(FAR struct nxfe_state_s *fe, uint8_t nch, FAR uint8_t *ch) */ size = sizeof(struct nxclimsg_kbdin_s) + nch - 1; - outmsg = (FAR struct nxclimsg_kbdin_s *)malloc(size); + outmsg = (FAR struct nxclimsg_kbdin_s *)kmalloc(size); if (outmsg) { /* Give the keypad input only to the top child */ @@ -109,7 +111,7 @@ void nxmu_kbdin(FAR struct nxfe_state_s *fe, uint8_t nch, FAR uint8_t *ch) } (void)nxmu_sendclientwindow(fe->be.topwnd, outmsg, size); - free(outmsg); + kfree(outmsg); } } |