mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-08 05:57:19 +00:00
Merged in masayuki2009/nuttx.apps/bug_fix_by_sony (pull request #86)
nshlib: Fix a resource leak in cmd_hexdump() Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
commit
2e0796bf40
1 changed files with 1 additions and 0 deletions
|
|
@ -395,6 +395,7 @@ int cmd_hexdump(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
|
|||
buffer = (FAR uint8_t *)malloc(IOBUFFERSIZE);
|
||||
if(buffer == NULL)
|
||||
{
|
||||
(void)close(fd);
|
||||
nsh_output(vtbl, g_fmtcmdfailed, "hexdump", "malloc", NSH_ERRNO);
|
||||
return ERROR;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue