Module: xenomai-forge
Branch: next
Commit: 090532ab2b272aa575895107117cb6836ccbeb30
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=090532ab2b272aa575895107117cb6836ccbeb30

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Jul 24 10:46:14 2014 +0200

copperplate/debug: prevent ref to invalid TCB

---

 include/copperplate/debug.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/copperplate/debug.h b/include/copperplate/debug.h
index 39bcfba..027f12c 100644
--- a/include/copperplate/debug.h
+++ b/include/copperplate/debug.h
@@ -30,7 +30,7 @@ struct threadobj;
                struct threadobj *__thobj = threadobj_current();        \
                if (__thobj == NULL ||                                  \
                    (__thobj->status & __THREAD_S_DEBUG) != 0)          \
-                       __debug(__thobj->name, __fmt, ##__args);        \
+                 __debug(__thobj ? __thobj->name : NULL, __fmt, ##__args); \
        } while (0)
 
 #else /* !CONFIG_XENO_DEBUG */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to