]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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)
committerMarkus Elfring <elfring@users.sourceforge.net>
Mon, 17 Aug 2015 07:10:56 +0000 (09:10 +0200)
The function "mfree" should be called instead of "free" at a specific
source code place.

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

index b0577cc412cce3b3f228c5727f7b5d89cb78c944..7714baf045055b69fd3b22a9fdd049506d8812b7 100644 (file)
@@ -143,11 +143,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);