rem: fd = fopen (filename, "r");
add: if (!g_file_get_contents (filename, &line, NULL, NULL) || line == NULL) { g_free (filename); return NULL; }
context: cdrom_get_name (struct cdrom_unit *cdrom, struct scsi_unit *units, int n_units){	char *filename, line[2048], *retval;	FILE *fd;	struct scsi_unit *unit;	int bus, id, lun;	g_return_val_if_fail (cdrom != NULL, FALSE);	if (cdrom->device[0] == 's' &&	    cdrom->device[1] == 'r') {		get_cd_scsi_id (cdrom->device[2], &bus, &id, &lun);		unit = lookup_scsi_unit (bus, id, lun, units, n_units);		if (unit) {			retval = g_strdup_printf ("%s - %s",						  unit->vendor,						  unit->model);		} else {			retval = g_strdup_printf ("%s (%s)", _("Unnamed Drive"),					cdrom->device);		}	} else {		filename = g_strdup_printf ("/proc/ide/%s/model",				cdrom->device);		fd = fopen (filename, "r");		g_free (filename);		if (fd == NULL) {			return NULL;		}		fscanf (fd, "%s", line);		retval = g_strdup_printf (line);		fclose (fd);	}	return retval;}