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