Properly duplicate the hostname passed in on connect.
authorColin Guthrie <pulse@colin.guthr.ie>
Sun, 11 May 2008 12:18:36 +0000 (12:18 +0000)
committerColin Guthrie <pulse@colin.guthr.ie>
Wed, 8 Oct 2008 19:32:07 +0000 (20:32 +0100)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/coling@2396 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/modules/rtp/raop_client.c

index 0df80e1..bad747b 100644 (file)
@@ -355,7 +355,7 @@ pa_raop_client* pa_raop_client_new(pa_mainloop_api *mainloop, const char* host)
 
     c->mainloop = mainloop;
     c->fd = -1;
-    c->host = host;
+    c->host = pa_xstrdup(host);
     c->rtsp = pa_rtsp_client_new("iTunes/4.6 (Macintosh; U; PPC Mac OS X 10.3)");
 
     /* Initialise the AES encryption system */
@@ -390,6 +390,7 @@ void pa_raop_client_free(pa_raop_client* c)
     pa_xfree(c->aes_iv);
     pa_xfree(c->aes_nv);
     pa_xfree(c->aes_key);
+    pa_xfree(c->host);
     pa_xfree(c);
 }