You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/11/08 18:25:20 UTC

[incubator-nuttx] branch master updated: boards/sim/sim/sim/src/sim_touchscreen.c: add missing nx_disconnect

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 5849d88  boards/sim/sim/sim/src/sim_touchscreen.c: add missing nx_disconnect
5849d88 is described below

commit 5849d88288000c10ed7a96c55ac57e031a8b31fc
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Sun Nov 8 18:12:42 2020 +0200

    boards/sim/sim/sim/src/sim_touchscreen.c: add missing nx_disconnect
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 boards/sim/sim/sim/src/sim_touchscreen.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/boards/sim/sim/sim/src/sim_touchscreen.c b/boards/sim/sim/sim/src/sim_touchscreen.c
index 070e767..eca5847 100644
--- a/boards/sim/sim/sim/src/sim_touchscreen.c
+++ b/boards/sim/sim/sim/src/sim_touchscreen.c
@@ -205,9 +205,11 @@ int sim_tsc_setup(int minor)
       pthread_attr_setstacksize(&attr, CONFIG_SIM_LISTENER_STACKSIZE);
 
       ret = pthread_create(&thread, &attr, sim_listener, NULL);
+      pthread_attr_destroy(&attr);
       if (ret != 0)
         {
           gerr("ERROR: pthread_create failed: %d\n", ret);
+          nx_disconnect(g_simtc.hnx);
           return -ret;
         }