X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fudev-acl%2Fudev-acl.c;h=41e2536e037da002490cc15eaf331dbdbaa5a65d;hb=7c2dee4a4d7f1b264031daaee786a8fe429884e1;hp=31e9991a51dded24a131409e6dac63cba1a35e2c;hpb=9ac90ae153accdfcb56c24c5748690933ad219b2;p=elogind.git diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c index 31e9991a5..41e2536e0 100644 --- a/extras/udev-acl/udev-acl.c +++ b/extras/udev-acl/udev-acl.c @@ -258,11 +258,6 @@ static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, con u = u2; } break; - case ACTION_NONE: - break; - default: - g_assert_not_reached(); - break; } *remove_session_id = old_session; @@ -293,8 +288,10 @@ static void apply_acl_to_devices(uid_t uid, int add) if (device == NULL) continue; node = udev_device_get_devnode(device); - if (node == NULL) + if (node == NULL) { + udev_device_unref(device); continue; + } set_facl(node, uid, add); udev_device_unref(device); } @@ -364,7 +361,6 @@ int main (int argc, char* argv[]) break; case 'h': printf("Usage: udev-acl --action=ACTION [--device=DEVICEFILE] [--user=UID]\n\n"); - default: goto out; } }