kernels/linux-2.4.0/drivers/usb/ov511.c
/* 
 * - You must acquire buf_lock before entering this function.
 * - Because this code will free any non-null pointer, you must be sure to null
 *   them if you explicitly free them somewhere else!
 */
- You must acquire buf_lock before entering this function.
- Because this code will free any non-null pointer, you must be sure to null
them if you explicitly free them somewhere else!
- You must acquire buf_lock before entering this function . - Because this code will free any non - null pointer you must be sure to null them if you explicitly free them somewhere else!
static void ov511_do_dealloc(struct usb_ov511 *ov511)
{
	int i;
	PDEBUG(4, "entered");
	if (ov511->fbuf) {
		rvfree(ov511->fbuf, OV511_NUMFRAMES * MAX_DATA_SIZE);
		ov511->fbuf = NULL;
	}
	for (i = 0; i < OV511_NUMFRAMES; i++) {
		if (ov511->sbuf[i].data) {
			kfree(ov511->sbuf[i].data);
			ov511->sbuf[i].data = NULL;
		}
	}
	PDEBUG(4, "buffer memory deallocated");
	ov511->buf_state = BUF_NOT_ALLOCATED;
	PDEBUG(4, "leaving");
}
static void ov511_do_dealloc ( struct usb_ov511 * ov511 ) { int i ; PDEBUG ( 4 , " " ) ; if ( ov511 -> fbuf ) { rvfree ( ov511 -> fbuf , OV511_NUMFRAMES * MAX_DATA_SIZE ) ; ov511 -> fbuf = NULL ; } for ( i = 0 ; i < OV511_NUMFRAMES ; i ++ ) { if ( ov511 -> sbuf [ i ] . data ) { kfree ( ov511 -> sbuf [ i ] . data ) ; ov511 -> sbuf [ i ] . data = NULL ; } } PDEBUG ( 4 , " " ) ; ov511 -> buf_state = BUF_NOT_ALLOCATED ; PDEBUG ( 4 , " " ) ; }
- You must acquire buf_lock before entering this function.
- You must acquire buf_lock before entering this function .