lkml.org 
[lkml]   [2000]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectBug in IrDA
Hi, 

Using the following code my 2.2.16 and 2.4.0test4 machines quickly runs
out of memory. I have stared at af_irda.h for a while, but my
kernel-knowledge is very limited and I can't find any obvious memleaks.

You don't need to have IrDA up and running to run this program,
compiling the kernel with IrDA-support is enough.

-------------------------
#include <sys/socket.h>
#include <irda.h>
/* If you don't have irda.h you can define AF_IRDA to 17 */

int main(int argc, char *argv[])
{
int sock;

while(1) {
sock = socket(AF_IRDA, SOCK_STREAM, 0);
if(sock < 0) {
perror("socket");
return -1;
}
close(sock);
}
return 0;
}
-------------------------

/Pontus Fuchs

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.047 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site