PolkitAgent: Avoid crashing if initializing the server object fails
authorAdam Jackson <ajax@nwnk.net>
Tue, 9 Oct 2012 18:08:24 +0000 (14:08 -0400)
committerDavid Zeuthen <zeuthen@gmail.com>
Tue, 9 Oct 2012 18:08:24 +0000 (14:08 -0400)
commit59f2d96ce3ac63173669f299a9453a7bf5e70a70
tree70cbe8b5057ee6f3c9d58bf3fed4107920107301
parentfa04223240d46641b0773dbf9f7d72f529046bea
PolkitAgent: Avoid crashing if initializing the server object fails

Note that otherwise we return a freed server object.  Since later in
polkit_agent_listener_register_with_options we check against NULL to
determine failure, this makes for sad times later when we call
server_free() on it again.

https://bugs.freedesktop.org/show_bug.cgi?id=55776

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
src/polkitagent/polkitagentlistener.c