mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Revert "binfmt: Fix memory leak in ELF loader"
This reverts commit 23d57be21b.
This commit is contained in:
committed by
Petro Karashchenko
parent
43f0555bfb
commit
aecdcb316b
+2
-3
@@ -277,10 +277,9 @@ static int elf_loadbinary(FAR struct binary_s *binp,
|
|||||||
up_addrenv_clone(&loadinfo.addrenv, &binp->addrenv);
|
up_addrenv_clone(&loadinfo.addrenv, &binp->addrenv);
|
||||||
#else
|
#else
|
||||||
binp->alloc[0] = (FAR void *)loadinfo.textalloc;
|
binp->alloc[0] = (FAR void *)loadinfo.textalloc;
|
||||||
binp->alloc[1] = (FAR void *)loadinfo.dataalloc;
|
|
||||||
#ifdef CONFIG_BINFMT_CONSTRUCTORS
|
#ifdef CONFIG_BINFMT_CONSTRUCTORS
|
||||||
binp->alloc[2] = loadinfo.ctoralloc;
|
binp->alloc[1] = loadinfo.ctoralloc;
|
||||||
binp->alloc[3] = loadinfo.dtoralloc;
|
binp->alloc[2] = loadinfo.dtoralloc;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#define BINFMT_NALLOC 4
|
#define BINFMT_NALLOC 3
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
|
|||||||
Reference in New Issue
Block a user