[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.29,1.30
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.29,1.30 |
Date: |
Mon, 17 Mar 2003 18:31:40 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/msn2/libmsn2
In directory subversions:/tmp/cvs-serv17469/modules/msn2/libmsn2
Modified Files:
msn_core.C
Log Message:
try to fix more leaks
Index: msn_core.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_core.C,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- msn_core.C 16 Mar 2003 03:33:44 -0000 1.29
+++ msn_core.C 17 Mar 2003 23:31:38 -0000 1.30
@@ -626,12 +626,14 @@
}
msn_connect(conn, args[3], port);
+ delete [] args;
return;
}
if(!strcmp(args[0], "RNG"))
{
msn_handle_RNG(conn, args, numargs);
+ delete [] args;
return;
}
@@ -647,7 +649,6 @@
if(call->trid==trid)
{
(call->func)(conn, trid, args, numargs, call->data);
- delete args[0];
delete [] args;
return;
}
@@ -658,8 +659,7 @@
msn_handle_default(conn, args, numargs);
- delete args[0];
- delete args;
+ delete [] args;
}
void msn_handle_close(int sock)
@@ -894,13 +894,9 @@
{
retval=mime;
} else {
- char * tmp=new char[strlen(header)+3];
- strcpy(tmp, "\r\n");
- strcat(tmp, header);
retval=strstr(mime, header);
if(retval==NULL) { return NULL; }
retval+=2;
- delete tmp;
}
while(*retval!=':') { retval++; }
@@ -937,7 +933,8 @@
while(1)
{
if(l==NULL)
- { if(!inv_is_out) { l=conn->invitations_out; inv_is_out=1; continue; }
else { break; } }
+ { if(!inv_is_out) { l=conn->invitations_out; inv_is_out=1; continue; }
+ else { break; } }
inv=(invitation *)l->data;
if(inv) {
if(DEBUG)
@@ -949,7 +946,7 @@
inv=NULL;
l=l->next;
}
-
+ delete cookie;
if(!strcmp(command, "INVITE"))
{
@@ -1018,6 +1015,8 @@
inv->filesize=atol(tmp2);
ext_filetrans_invite(conn, from, friendlyname, inv);
+ if(tmp1!=NULL) { delete tmp1; tmp1=NULL;}
+ if(tmp2!=NULL) { delete tmp2; tmp1=NULL;}
} else if ((tmp1=msn_find_in_mime(body, "Session-Protocol")) != NULL
&& (tmp2=msn_find_in_mime(body, "Context-Data")) != NULL) {
snprintf(buf, 1024, "%s sent a yet-unsupported Voice Invitation.",from);
@@ -1025,8 +1024,8 @@
recognized=1;
}
- if(tmp1!=NULL) { delete tmp1; }
- if(tmp2!=NULL) { delete tmp2; }
+ if(tmp1!=NULL) { delete tmp1; tmp1=NULL;}
+ if(tmp2!=NULL) { delete tmp2; tmp1=NULL;}
delete appname;
@@ -1129,15 +1128,13 @@
ext_filetrans_failed(auth->inv, errno, strerror(errno));
msn_del_from_llist(conn->invitations_in, auth->inv);
msn_clean_up(conn);
- delete args[0];
- delete args;
+ delete [] args;
return;
}
write(conn->sock, "TFR\r\n", strlen("TFR\r\n"));
}
- delete args[0];
- delete args;
+ delete [] args;
auth->num_ignore=3;
}
@@ -1242,6 +1239,7 @@
ext_filetrans_failed(auth->inv, errno, strerror(errno));
msn_del_from_llist(auth->inv->conn->invitations_out, auth->inv);
msn_clean_up(conn);
+ delete [] args;
return;
}
@@ -1258,12 +1256,14 @@
ext_filetrans_failed(auth->inv, errno, "Could not open file for
reading");
msn_del_from_llist(auth->inv->conn->invitations_out, auth->inv);
msn_clean_up(conn);
+ delete [] args;
return;
}
// OK, now we lose control, but the next round of the polling loop
will
// say that the socket is writable, and then the fun starts...
ext_filetrans_progress(auth->inv, "Sending data", 0, 0);
+ delete [] args;
}
} else {
// just pumping data now
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.29,1.30,
Colin Leroy <address@hidden> <=