From 6a5b012dc38e8036a5d762283975cd710450a495 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 2 Jun 2014 18:06:26 +0200 Subject: [PATCH] avahi: tvheadend_webroot can be NULL - fix the fix --- src/avahi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/avahi.c b/src/avahi.c index c1084c5e..662957eb 100644 --- a/src/avahi.c +++ b/src/avahi.c @@ -152,7 +152,7 @@ create_services(AvahiClient *c) path = malloc(strlen(tvheadend_webroot) + 6); sprintf(path, "path=%s", tvheadend_webroot); } else { - path = "/"; + path = strdup("path=/"); } /* Add the service for HTTP */ @@ -162,8 +162,7 @@ create_services(AvahiClient *c) path, NULL)) < 0) { - if (tvheadend_webroot) - free(path); + free(path); if (ret == AVAHI_ERR_COLLISION) goto collision;