]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blobdiff - linux/src/transport/TransportRpmsg.c
Reset heapId after reading socket in TransportRpmsg
[ipc/ipcdev.git] / linux / src / transport / TransportRpmsg.c
index ae426fb36ccceb78218faed05d4471d1bb88541b..960b922ba4f99f1cce6aa6a18a4fb3546c28e439 100644 (file)
@@ -682,13 +682,8 @@ static Int transportGet(int sock, MessageQ_Msg *retMsg)
           */
          msg->msgSize = byteCount;
 
-         /*
-          * If the message received was statically allocated, reset the
-          * heapId, so the app can free it.
-          */
-         if (msg->heapId == MessageQ_STATICMSG)  {
-             msg->heapId = 0;  /* for a copy transport, heap id is 0. */
-         }
+         /* set the heapId in the message header to match allocation above */
+         msg->heapId = 0;
     }
 
     PRINTVERBOSE1("transportGet: recvfrom socket: fd: %d\n", sock)