Sorry for just mentioning ibfind earlier, because the same thing can occur using ibdev.  When you use ibdev, it opens a handle to the device, or a device descriptor.  From the NI-488.2 help file, you can use ibdev in C code like this:
ud = ibdev (BdIndx, pad, sad, tmo, eot, eos) 
where the inputs are described as follows (they are all data type int):
BdIndx  Index of the access board for the device 
pad     The primary GPIB address of the device 
sad     The secondary GPIB address of the device 
tmo     The I/O timeout value 
eot     EOI mode of the device 
eos     EOS character and modes 
The output of the function, which I have labeled ud, is an integer which is the device descriptor.  Every time ibdev (or ibfind) is called, it creates a new device descriptor as an output.  If you run this in a loop, and never close the handle, it will keep creating new device descriptors and keep them all open, until the driver cannot handle any more.  It looks like we're running into a limit at 1024.
To fix this, you need to discard the handle using ibonl.  Simply call ibonl with your device descriptor and the value 0 as inputs.  In this case:
ibonl (ud, 0)
This should keep the program from having too many device descriptors open at once.
John M
Applications Engineer