From 764e05bf6a5f2a07d2a7f86edc1fbd43af2da24c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 5 Nov 2013 09:12:08 -0600 Subject: [PATCH] Correct unitialization of composite USB device. A stale pointer was being reused. From David Sidrane --- system/composite/composite_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/composite/composite_main.c b/system/composite/composite_main.c index b34d38b99..b5a41a2fd 100644 --- a/system/composite/composite_main.c +++ b/system/composite/composite_main.c @@ -434,7 +434,6 @@ static int open_serial(void) message("open_serial: Successfully opened the serial driver\n"); return OK; } -#endif /**************************************************************************** * Name: echo_serial @@ -474,8 +473,10 @@ static int echo_serial(void) message("echo_serial: ERROR: read size: %d write size: %d\n", bytesread, byteswritten); } + return OK; } +#endif /**************************************************************************** * Public Functions @@ -577,6 +578,7 @@ int board_mscclassobject(FAR struct usbdevclass_driver_s **classdev) message("board_mscclassobject: usbmsc_classobject failed: %d\n", -ret); usbmsc_uninitialize(g_composite.mschandle); } + check_test_memory_usage("After usbmsc_classobject()"); return ret; }