Allow comedi_cleanup_calibration to accept a NULL argument.
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 14 Mar 2008 17:52:20 +0000 (17:52 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 14 Mar 2008 17:52:20 +0000 (17:52 +0000)
lib/calib_yacc.y

index f8725c7e526ac34d37aa2e49e24b1fb20f2d4482..5c256a8a1050b0b5cfc4df279fa1adb4ad3ab5db 100644 (file)
@@ -263,6 +263,7 @@ static comedi_calibration_t* alloc_calib_parse( void )
 EXPORT_ALIAS_DEFAULT(_comedi_cleanup_calibration,comedi_cleanup_calibration,0.7.20);
 extern void _comedi_cleanup_calibration( comedi_calibration_t *file_contents )
 {
+       if(file_contents == NULL) return;
        if( file_contents->driver_name )
        {
                free( file_contents->driver_name );