info->description = strdup(sep); 
info->description = kstrdup(sep, GFP_KERNEL); 
static void parse_data(struct parport *port, int device, char *str){	char *txt = kmalloc(strlen(str)+1, GFP_KERNEL);	char *p = txt, *q;	int guessed_class = PARPORT_CLASS_UNSPEC;	struct parport_device_info *info = &port->probe_info[device + 1];	if (!txt) {		printk(KERN_WARNING "%s probe: memory squeeze\n", port->name);		return;	}	strcpy(txt, str);	while (p) {		char *sep;		q = strchr(p, ';');		if (q) *q = 0;		sep = strchr(p, ':');		if (sep) {			char *u;			*(sep++) = 0;			/* Get rid of trailing blanks */			u = sep + strlen (sep) - 1;			while (u >= p && *u == ' ')				*u-- = '\0';			u = p;			while (*u) {				*u = toupper(*u);				u++;			}			if (!strcmp(p, "MFG") || !strcmp(p, "MANUFACTURER")) {				if (info->mfr)					kfree (info->mfr);				info->mfr = strdup(sep);			} else if (!strcmp(p, "MDL") || !strcmp(p, "MODEL")) {				if (info->model)					kfree (info->model);				info->model = strdup(sep);			} else if (!strcmp(p, "CLS") || !strcmp(p, "CLASS")) {				int i;				if (info->class_name)					kfree (info->class_name);				info->class_name = strdup(sep);				for (u = sep; *u; u++)					*u = toupper(*u);				for (i = 0; classes[i].token; i++) {					if (!strcmp(classes[i].token, sep)) {						info->class = i;						goto rock_on;					}				}				printk(KERN_WARNING "%s probe: warning, class '%s' not understood.\n", port->name, sep);				info->class = PARPORT_CLASS_OTHER;			} else if (!strcmp(p, "CMD") ||				   !strcmp(p, "COMMAND SET")) {				if (info->cmdset)					kfree (info->cmdset);				info->cmdset = strdup(sep);				/* if it speaks printer language, it's				   probably a printer */				if (strstr(sep, "PJL") || strstr(sep, "PCL"))					guessed_class = PARPORT_CLASS_PRINTER;			} else if (!strcmp(p, "DES") || !strcmp(p, "DESCRIPTION")) {				if (info->description)					kfree (info->description);				info->description = strdup(sep);			}		}	rock_on:		if (q) p = q+1; else p=NULL;	}	/* If the device didn't tell us its class, maybe we have managed to	   guess one from the things it did say. */	if (info->class == PARPORT_CLASS_UNSPEC)		info->class = guessed_class;	pretty_print (port, device);	kfree(txt);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/543537bd922692bc978e2e356fcd8bfc9c2ee7d5/probe.c/buggy/drivers/parport/probe.c