summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ea52e2a)
Had this fix lying around here for some time. Thanks to missing
type-checking for va-args we passed in the actual major/minor values
instead of pointers to it. Fix it by saving the values on the stack first
and passing in the pointers.
_cleanup_dbus_message_unref_ DBusMessage *m = NULL;
_cleanup_free_ char *path = NULL;
const char *t = NULL;
_cleanup_dbus_message_unref_ DBusMessage *m = NULL;
_cleanup_free_ char *path = NULL;
const char *t = NULL;
+ major = major(sd->dev);
+ minor = minor(sd->dev);
+
if (!sd->session->controller)
return;
if (!sd->session->controller)
return;
switch (type) {
case SESSION_DEVICE_RESUME:
if (!dbus_message_append_args(m,
switch (type) {
case SESSION_DEVICE_RESUME:
if (!dbus_message_append_args(m,
- DBUS_TYPE_UINT32, major(sd->dev),
- DBUS_TYPE_UINT32, minor(sd->dev),
+ DBUS_TYPE_UINT32, &major,
+ DBUS_TYPE_UINT32, &minor,
DBUS_TYPE_UNIX_FD, &sd->fd,
DBUS_TYPE_INVALID))
return;
DBUS_TYPE_UNIX_FD, &sd->fd,
DBUS_TYPE_INVALID))
return;
}
if (t && !dbus_message_append_args(m,
}
if (t && !dbus_message_append_args(m,
- DBUS_TYPE_UINT32, major(sd->dev),
- DBUS_TYPE_UINT32, minor(sd->dev),
+ DBUS_TYPE_UINT32, &major,
+ DBUS_TYPE_UINT32, &minor,
DBUS_TYPE_STRING, &t,
DBUS_TYPE_INVALID))
return;
DBUS_TYPE_STRING, &t,
DBUS_TYPE_INVALID))
return;