QNX: NameServer_daemon: Initialize mutex_attr 3.46 ipc-3.46-next 3.46.02.04 3.46.02.04_eng
authorAngela Stegmaier <angelabaker@ti.com>
Fri, 16 Jun 2017 19:41:21 +0000 (14:41 -0500)
committerAngela Stegmaier <angelabaker@ti.com>
Fri, 30 Jun 2017 15:42:43 +0000 (10:42 -0500)
Initialize mutex_attr before using it. Otherwise, it could
contain some uninitialized values.

This patch is ported from commit id
7b3a739876e46d3194861a2d93077ff95954affb

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/NameServer_daemon.c

index ab02f74247094e266e97644bd9ccde94675f9096..2d37ca4d86cf751901b1c5422923df5780f1bfb5 100644 (file)
@@ -562,6 +562,7 @@ NameServer_Handle NameServer_create(String name,
      * NameServer_removeEntry() enters gate and is called by
      * NameServer_remove() while holding the gate.
      */
+    pthread_mutexattr_init(&mutex_attr);
     pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE);
     pthread_mutex_init(&handle->gate, &mutex_attr);