]> code.delx.au - pulseaudio/commitdiff
daemon: realpath segfault fix
authorDavid Yoder <davidmyoder@gmail.com>
Fri, 30 Oct 2009 14:54:08 +0000 (09:54 -0500)
committerLennart Poettering <lennart@poettering.net>
Sat, 31 Oct 2009 00:56:59 +0000 (01:56 +0100)
Lennart,

Apparently I was debugging this at the same time as you. I can't figure out
why my Fedora 11 install with glibc-2.10 has a glibc realpath that doesn't
match the gnu documentation and returns null. But it does.

Your commit aa8ce5bb9b159abb2ffb0f43996340566fc2e9c6 almost fixed my
problem, but it needs a tweak.

Thanks,
David Yoder

src/daemon/main.c

index 576fc3e688ffa66bf0ed2a82c03b215857b8dbc8..c73e9afcf96f169a79709fe1f139714476daf8a0 100644 (file)
@@ -425,7 +425,7 @@ int main(int argc, char *argv[]) {
 
         pa_set_env("LD_BIND_NOW", "1");
 
-        if (!(canonical_rp = pa_realpath(PA_BINARY))) {
+        if ((canonical_rp = pa_realpath(PA_BINARY))) {
 
             if ((rp = pa_readlink("/proc/self/exe"))) {