kdbus: fix NULL free on TIZEN code path for sending unmatched replies
authorKonrad Lipinski <konrad.l@samsung.com>
Tue, 20 Sep 2016 10:27:52 +0000 (12:27 +0200)
committerAdrian Szyndela <adrian.s@samsung.com>
Wed, 7 Aug 2019 14:18:00 +0000 (16:18 +0200)
ipc/kdbus/connection.c

index 0406054d4069a610859a693f3083ceb151c90e45..60562018dcd776bb4b434958a9a8294b1efa07c1 100644 (file)
@@ -1049,7 +1049,8 @@ static int kdbus_conn_reply(struct kdbus_conn *src,
 
 exit:
        up_read(&bus->name_registry.rwlock);
-       if (dontWant) /* if the other side is no longer interested, we have to free the reply ourselves */
+       /* NOTE: check for reply being non-NULL only necessary on TIZEN because replies are not being filtered */
+       if (dontWant && reply) /* if the other side is no longer interested, we have to free the reply ourselves */
                kdbus_reply_free(reply);
        return ret;
 }