Example Software for EVAL-AD5770R
Dependencies: platform_drivers adi_console_menu
Revision 3:8a6aa77aba73, committed 2020-05-19
- Comitter:
- mbradley
- Date:
- Tue May 19 22:09:49 2020 +0000
- Parent:
- 2:f9c4e9181bc5
- Commit message:
- Nulling device pointer to fix issue with use after free device pointer
Changed in this revision
app/ad5770r_console_app.c | Show annotated file Show diff for this revision Revisions of this file |
diff -r f9c4e9181bc5 -r 8a6aa77aba73 app/ad5770r_console_app.c --- a/app/ad5770r_console_app.c Mon Mar 30 17:18:48 2020 +0000 +++ b/app/ad5770r_console_app.c Tue May 19 22:09:49 2020 +0000 @@ -158,11 +158,12 @@ */ static int32_t do_device_remove(uint32_t id) { - if (ad5770r_remove(pAd5770r_dev) == SUCCESS) { - } else { + if (ad5770r_remove(pAd5770r_dev) != SUCCESS) { printf("\n\r *** Error doing device remove ***\n\r"); } + pAd5770r_dev = NULL; + adi_press_any_key_to_continue(); return(MENU_CONTINUE); }