Blame SOURCES/0001-cups-browsed-Fixed-freeing-of-literal-string-caused-.patch
|
|
7e3931 |
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
|
|
7e3931 |
index 9f6f25b7..7c3f5c2b 100644
|
|
|
7e3931 |
--- a/utils/cups-browsed.c
|
|
|
7e3931 |
+++ b/utils/cups-browsed.c
|
|
|
7e3931 |
@@ -7889,8 +7889,11 @@ read_configuration (const char *filename)
|
|
|
7e3931 |
debug_printf("Invalid %s value: %d\n",
|
|
|
7e3931 |
line, t);
|
|
|
7e3931 |
} else if (!strcasecmp(line, "DomainSocket") && value) {
|
|
|
7e3931 |
- if (DomainSocket == NULL && value[0] != '\0')
|
|
|
7e3931 |
+ if (value[0] != '\0') {
|
|
|
7e3931 |
+ if (DomainSocket != NULL)
|
|
|
7e3931 |
+ free(DomainSocket);
|
|
|
7e3931 |
DomainSocket = strdup(value);
|
|
|
7e3931 |
+ }
|
|
|
7e3931 |
} else if ((!strcasecmp(line, "HttpLocalTimeout") || !strcasecmp(line, "HttpRemoteTimeout")) && value) {
|
|
|
7e3931 |
int t = atoi(value);
|
|
|
7e3931 |
if (t >= 0) {
|
|
|
7e3931 |
@@ -8466,7 +8469,7 @@ int main(int argc, char*argv[]) {
|
|
|
7e3931 |
} else {
|
|
|
7e3931 |
#ifdef CUPS_DEFAULT_DOMAINSOCKET
|
|
|
7e3931 |
if (DomainSocket == NULL)
|
|
|
7e3931 |
- DomainSocket = CUPS_DEFAULT_DOMAINSOCKET;
|
|
|
7e3931 |
+ DomainSocket = strdup(CUPS_DEFAULT_DOMAINSOCKET);
|
|
|
7e3931 |
#endif
|
|
|
7e3931 |
if (DomainSocket != NULL) {
|
|
|
7e3931 |
struct stat sockinfo; /* Domain socket information */
|