chiark / gitweb /
Bug #944: Replacement of a free() call by mfree()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 17 Aug 2015 07:10:56 +0000 (09:10 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:18:46 +0000 (10:18 +0100)
The function "mfree" should be called instead of "free" at a specific
source code place.

src/libelogind/sd-bus/bus-message.c

index 3261154e04867feb13239550d5b8f9c87e1f3a7f..85882c1811d24ef7d8cb517e0600ba063158784a 100644 (file)
@@ -144,11 +144,7 @@ static void message_free(sd_bus_message *m) {
         if (m->iovec != m->iovec_fixed)
                 free(m->iovec);
 
-        if (m->destination_ptr) {
-                free(m->destination_ptr);
-                m->destination_ptr = NULL;
-        }
-
+        m->destination_ptr = mfree(m->destination_ptr);
         message_reset_containers(m);
         free(m->root_container.signature);
         free(m->root_container.offsets);