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:
patacongo
2007-03-29 16:53:03 +00:00
parent ed4fe71b96
commit 448c7f4618
4 changed files with 67 additions and 46 deletions
+5 -2
View File
@@ -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);
}
}
}