if (qin) kfree(qin); if (qout) kfree(qout); 
kfree(qin); kfree(qout); 
query_segment_type (struct dcss_segment *seg){	struct qin64  *qin = kmalloc (sizeof(struct qin64), GFP_DMA);	struct qout64 *qout = kmalloc (sizeof(struct qout64), GFP_DMA);	int diag_cc, rc, i;	unsigned long dummy, vmrc;	if ((qin == NULL) || (qout == NULL)) {		rc = -ENOMEM;		goto out_free;	}	/* initialize diag input parameters */	qin->qopcode = DCSS_FINDSEGA;	qin->qoutptr = (unsigned long) qout;	qin->qoutlen = sizeof(struct qout64);	memcpy (qin->qname, seg->dcss_name, 8);	diag_cc = dcss_diag (DCSS_SEGEXT, qin, &dummy, &vmrc);	if (diag_cc > 1) {		rc = dcss_diag_translate_rc (vmrc);		goto out_free;	}	if (qout->segcnt > 6) {		rc = -ENOTSUPP;		goto out_free;	}	if (qout->segcnt == 1) {		seg->vm_segtype = qout->range[0].start & 0xff;	} else {		/* multi-part segment. only one type supported here:		    - all parts are contiguous		    - all parts are either EW or EN type		    - maximum 6 parts allowed */		unsigned long start = qout->segstart >> PAGE_SHIFT;		for (i=0; i<qout->segcnt; i++) {			if (((qout->range[i].start & 0xff) != SEG_TYPE_EW) &&			    ((qout->range[i].start & 0xff) != SEG_TYPE_EN)) {				rc = -ENOTSUPP;				goto out_free;			}			if (start != qout->range[i].start >> PAGE_SHIFT) {				rc = -ENOTSUPP;				goto out_free;			}			start = (qout->range[i].end >> PAGE_SHIFT) + 1;		}		seg->vm_segtype = SEG_TYPE_EWEN;	}	/* analyze diag output and update seg */	seg->start_addr = qout->segstart;	seg->end = qout->segend;	memcpy (seg->range, qout->range, 6*sizeof(struct qrange));	seg->segcnt = qout->segcnt;	rc = 0; out_free:	if (qin) kfree(qin);	if (qout) kfree(qout);	return rc;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b2325fe1b7e5654fac9e9419423aa2c58a3dbd83/extmem.c/buggy/arch/s390/mm/extmem.c