[xiph-cvs] cvs commit: icecast/src yp.c source.c geturl.c

Karl Heyes karl at xiph.org
Mon Feb 16 13:59:09 PST 2004



karl        04/02/16 16:59:08

  Modified:    src      yp.c source.c geturl.c
  Log:
  YP related cleanup, avoid bad pointer reference on HUP

Revision  Changes    Path
1.17      +3 -0      icecast/src/yp.c

Index: yp.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/yp.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- yp.c	29 Jan 2004 01:02:07 -0000	1.16
+++ yp.c	16 Feb 2004 21:59:08 -0000	1.17
@@ -434,6 +434,9 @@
 void yp_destroy_ypdata(ypdata_t *ypdata)
 {
     if (ypdata) {
+        if (ypdata->yp_url) {
+            free(ypdata->yp_url);
+        }
         if (ypdata->sid) {
             free(ypdata->sid);
         }

<p><p>1.68      +1 -1      icecast/src/source.c

Index: source.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/source.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- source.c	29 Jan 2004 16:46:54 -0000	1.67
+++ source.c	16 Feb 2004 21:59:08 -0000	1.68
@@ -344,7 +344,7 @@
         if (config->yp_url[i]) {
             source->ypdata[source->num_yp_directories] = yp_create_ypdata();
             source->ypdata[source->num_yp_directories]->yp_url = 
-                config->yp_url[i];
+                strdup (config->yp_url[i]);
             source->ypdata[source->num_yp_directories]->yp_url_timeout = 
                 config->yp_url_timeout[i];
             source->ypdata[source->num_yp_directories]->yp_touch_interval = 0;

<p><p>1.7       +1 -0      icecast/src/geturl.c

Index: geturl.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/geturl.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- geturl.c	29 Jan 2004 01:02:06 -0000	1.6
+++ geturl.c	16 Feb 2004 21:59:08 -0000	1.7
@@ -134,6 +134,7 @@
         curl_easy_cleanup(curl_connections[i].curl_handle);
         memset(&(curl_connections[i]), 0, sizeof(curl_connections[i]));
     }
+    curl_global_cleanup();
 }
 int curl_get_connection()
 {

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list