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/nxsu/nxsu_constructwindow.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/nxsu/nxsu_constructwindow.c')
-rw-r--r-- | nuttx/graphics/nxsu/nxsu_constructwindow.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/graphics/nxsu/nxsu_constructwindow.c b/nuttx/graphics/nxsu/nxsu_constructwindow.c index f812b3f83..194a62106 100644 --- a/nuttx/graphics/nxsu/nxsu_constructwindow.c +++ b/nuttx/graphics/nxsu/nxsu_constructwindow.c @@ -1,7 +1,7 @@ /**************************************************************************** * graphics/nxsu/nx_openwindow.c * - * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,9 @@ #include <errno.h> #include <debug.h> +#include <nuttx/kmalloc.h> #include <nuttx/nx/nx.h> + #include "nxfe.h" /**************************************************************************** @@ -81,10 +83,10 @@ * inheritance: The caller's window structure may include extensions that * are not visible to NX. * - * NOTE: wnd must have been allocated using malloc() (or related allocators) + * NOTE: wnd must have been allocated using kmalloc() (or related allocators) * Once provided to nxfe_constructwindow() that memory is owned and managed * by NX. On certain error conditions or when the window is closed, NX will - * free() the window. + * free the window. * * Input Parameters: * handle - The handle returned by nx_connect @@ -113,7 +115,7 @@ int nxfe_constructwindow(NXHANDLE handle, FAR struct nxbe_window_s *wnd, if (!fe || !cb) { - free(wnd); + kfree(wnd); errno = EINVAL; return ERROR; } |