mirror of
https://github.com/swaywm/sway.git
synced 2026-04-10 08:21:11 -04:00
Plug memory dbus_message_iter_get_signature leak
This commit is contained in:
parent
5c8dc9cb73
commit
b9f36716b5
4 changed files with 20 additions and 14 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#define _XOPEN_SOURCE 700
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
|
@ -137,6 +138,13 @@ static void dispatch_status(DBusConnection *connection, DBusDispatchStatus new_s
|
|||
|
||||
/* Public functions below */
|
||||
|
||||
bool dbus_message_iter_check_signature(DBusMessageIter *iter, const char *sig) {
|
||||
char *msg_sig = dbus_message_iter_get_signature(iter);
|
||||
int result = strcmp(msg_sig, sig);
|
||||
dbus_free(msg_sig);
|
||||
return (result == 0);
|
||||
}
|
||||
|
||||
void dispatch_dbus() {
|
||||
if (!should_dispatch || !conn) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue