fix destroy leak when using uart.

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@203 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2007-06-03 04:14:39 +00:00
parent 68365e349e
commit 6c13e901e0
1 changed files with 4 additions and 0 deletions

View File

@ -233,6 +233,10 @@ void dsp_bell202_destroy(dsp_bell202_handle_t **handle)
(*handle)->buffer = NULL;
}
if ((*handle)->attr.bytehandler) {
dsp_uart_destroy((dsp_uart_handle_t**)&(*handle)->attr.bithandler_arg);
}
free(*handle);
*handle = NULL;
}