mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-09 04:13:33 +02:00
main: Plug tiny memory leak
dbus_g_method_get_sender() returns an allocated-string which we need to free. This is handled properly in the rest of the codebase. https://bugs.freedesktop.org/show_bug.cgi?id=99811
This commit is contained in:
committed by
Bastien Nocera
parent
32307570fe
commit
8fa3dcd5cd
@ -402,7 +402,7 @@ static gboolean
|
|||||||
_fprint_device_check_polkit_for_action (FprintDevice *rdev, DBusGMethodInvocation *context, const char *action, GError **error)
|
_fprint_device_check_polkit_for_action (FprintDevice *rdev, DBusGMethodInvocation *context, const char *action, GError **error)
|
||||||
{
|
{
|
||||||
FprintDevicePrivate *priv = DEVICE_GET_PRIVATE(rdev);
|
FprintDevicePrivate *priv = DEVICE_GET_PRIVATE(rdev);
|
||||||
const char *sender;
|
char *sender;
|
||||||
PolkitSubject *subject;
|
PolkitSubject *subject;
|
||||||
PolkitAuthorizationResult *result;
|
PolkitAuthorizationResult *result;
|
||||||
GError *_error = NULL;
|
GError *_error = NULL;
|
||||||
@ -410,6 +410,7 @@ _fprint_device_check_polkit_for_action (FprintDevice *rdev, DBusGMethodInvocatio
|
|||||||
/* Check that caller is privileged */
|
/* Check that caller is privileged */
|
||||||
sender = dbus_g_method_get_sender (context);
|
sender = dbus_g_method_get_sender (context);
|
||||||
subject = polkit_system_bus_name_new (sender);
|
subject = polkit_system_bus_name_new (sender);
|
||||||
|
g_free (sender);
|
||||||
|
|
||||||
result = polkit_authority_check_authorization_sync (priv->auth,
|
result = polkit_authority_check_authorization_sync (priv->auth,
|
||||||
subject,
|
subject,
|
||||||
|
|||||||
Reference in New Issue
Block a user