Merge pull request #415 from dmarion/osx

avahi: tvheadend_webroot can be NULL - fix the fix
This commit is contained in:
perexg 2014-06-02 19:56:08 +02:00
commit 385c19019c

View file

@ -152,7 +152,7 @@ create_services(AvahiClient *c)
path = malloc(strlen(tvheadend_webroot) + 6); path = malloc(strlen(tvheadend_webroot) + 6);
sprintf(path, "path=%s", tvheadend_webroot); sprintf(path, "path=%s", tvheadend_webroot);
} else { } else {
path = "/"; path = strdup("path=/");
} }
/* Add the service for HTTP */ /* Add the service for HTTP */
@ -162,8 +162,7 @@ create_services(AvahiClient *c)
path, path,
NULL)) < 0) { NULL)) < 0) {
if (tvheadend_webroot) free(path);
free(path);
if (ret == AVAHI_ERR_COLLISION) if (ret == AVAHI_ERR_COLLISION)
goto collision; goto collision;