X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/126e4cf89f5ccfe393e60a930c88ab513eeee085..4a40aed9c0aa0d07450bb3334a435064466e94df:/src/pulsecore/core-error.c diff --git a/src/pulsecore/core-error.c b/src/pulsecore/core-error.c index 3d6c2c3b..c4408069 100644 --- a/src/pulsecore/core-error.c +++ b/src/pulsecore/core-error.c @@ -6,7 +6,7 @@ PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2 of the License, + by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. PulseAudio is distributed in the hope that it will be useful, but @@ -47,6 +47,9 @@ const char* pa_cstrerror(int errnum) { char *translated, *t; char errbuf[128]; + if (errnum < 0) + errnum = -errnum; + if ((t = PA_STATIC_TLS_GET(cstrerror))) pa_xfree(t);