Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
systemd-mini.414
0005-bus-avoid-using-m-kdbus-after-freeing-it.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-bus-avoid-using-m-kdbus-after-freeing-it.patch of Package systemd-mini.414
Based on fd989a0bc999d79719408ac28b126d9c9016bcb5 Mon Sep 17 00:00:00 2001 From: Philippe De Swert <philippedeswert@gmail.com> Date: Wed, 10 Sep 2014 12:20:38 +0300 Subject: [PATCH] bus: avoid using m->kdbus after freeing it m->kdbus could be freed before it is released. Changing the order fixes the issue. Found with Coverity. Fixes: CID#1237798 --- src/libsystemd/sd-bus/bus-message.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- src/libsystemd/sd-bus/bus-message.c +++ src/libsystemd/sd-bus/bus-message.c 2014-09-16 10:31:37.538735664 +0000 @@ -126,9 +126,6 @@ static void message_free(sd_bus_message message_reset_parts(m); - if (m->free_kdbus) - free(m->kdbus); - if (m->release_kdbus) { uint64_t off; @@ -136,6 +133,9 @@ static void message_free(sd_bus_message ioctl(m->bus->input_fd, KDBUS_CMD_FREE, &off); } + if (m->free_kdbus) + free(m->kdbus); + if (m->bus) sd_bus_unref(m->bus);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor