mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
Container being deallocated before buffers in container. Caused memory leak.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@177 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+5
-2
@@ -173,9 +173,9 @@ void lib_releaselist(FAR struct streamlist *list)
|
||||
/* Destroy the semaphore and release the filelist */
|
||||
|
||||
(void)sem_destroy(&list->sl_sem);
|
||||
sched_free(list);
|
||||
|
||||
/* Initialize each FILE structure */
|
||||
/* Release each stream in the list */
|
||||
|
||||
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
||||
for (i = 0; i < CONFIG_NFILE_STREAMS; i++)
|
||||
{
|
||||
@@ -190,6 +190,9 @@ void lib_releaselist(FAR struct streamlist *list)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Finally, release the list itself */
|
||||
|
||||
sched_free(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user