projects
/
platform
/
upstream
/
polkit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa04223
)
PolkitAgent: Avoid crashing if initializing the server object fails
author
Adam Jackson
<ajax@nwnk.net>
Tue, 9 Oct 2012 18:08:24 +0000
(14:08 -0400)
committer
David Zeuthen
<zeuthen@gmail.com>
Tue, 9 Oct 2012 18:08:24 +0000
(14:08 -0400)
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
patch
|
blob
|
history
diff --git
a/src/polkitagent/polkitagentlistener.c
b/src/polkitagent/polkitagentlistener.c
index
0d97501
..
5bddd03
100644
(file)
--- a/
src/polkitagent/polkitagentlistener.c
+++ b/
src/polkitagent/polkitagentlistener.c
@@
-260,10
+260,9
@@
server_new (PolkitSubject *subject,
if (!server_init_sync (server, cancellable, error))
{
server_free (server);
-
goto out
;
+
return NULL
;
}
- out:
return server;
}