[xiph-cvs] cvs commit: libshout/src shout.c

Michael Smith msmith at xiph.org
Mon Jan 20 00:24:27 PST 2003



msmith      03/01/20 03:24:27

  Modified:    src      shout.c
  Log:
  Fix double-close under error conditions in http login. Bug found by Karl Heyes.

Revision  Changes    Path
1.19      +0 -3      libshout/src/shout.c

Index: shout.c
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/shout.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- shout.c	16 Jan 2003 08:05:42 -0000	1.18
+++ shout.c	20 Jan 2003 08:24:27 -0000	1.19
@@ -828,13 +828,11 @@
         /* assume we'll have to authenticate, saves round trips on basic */
         if(send_http_request(self, self->user, self->password) != 0) {
 #endif
-		sock_close(self->socket);
                 return self->error = SHOUTERR_SOCKET;
         }
 
         if (util_read_header(self->socket, header, 4096) == 0) {
                 /* either we didn't get a complete header, or we timed out */
-		sock_close(self->socket);
                 return self->error = SHOUTERR_SOCKET;
         }
 
@@ -887,7 +885,6 @@
         }
 
         httpp_destroy(parser);
-	sock_close(self->socket);
         return self->error = SHOUTERR_REFUSED;
 }
 

<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