Commit 798208df authored by Jim Meyering's avatar Jim Meyering Committed by David Zeuthen
Browse files

handle kit_strdup_printf failure.



* src/polkit-dbus/polkit-dbus.c (polkit_caller_new_from_pid):
Signed-off-by: default avatarJim Meyering <meyering@redhat.com>
Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent c50aeb84
......@@ -643,7 +643,7 @@ polkit_caller_new_from_pid (DBusConnection *con, pid_t pid, DBusError *error)
if (uid == (uid_t) -1) {
proc_path = kit_strdup_printf ("/proc/%d", pid);
if (stat (proc_path, &statbuf) != 0) {
if (proc_path && stat (proc_path, &statbuf) != 0) {
kit_warning ("Cannot lookup information for pid %d: %s", pid, strerror (errno));
goto out;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment