test140.c 513 Bytes
Newer Older
1
typedef __crust__ unsigned char *crust_t;
2 3 4 5 6

#define NULL ((void *)0)

void function(crust_t param);

7 8
void main(crust_t param1, crust_t param2, crust_t param3, int a) {

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


	switch (a) {
		case 0:
			function(param1);
			break;
		case 1:
			function(param2);
			break;
		case 3:
			function(param3);
			break;
		default:
			function(param1);
			function(param2);
			function(param3);
		break;
26
	} // ERROR: if 'a' is 0, only 'param1' is freed; if 'a' is 1 only 'param2' is freed; if 'a' is 3 only 'param3' is freed
27
}