Is it safe to declare an array of structures, if the strucure itself contains dynamically allocated arrays? Below is some sample code.

The program I'm working on seems to work, but I'm worried that the array of structures will get me in trouble later.

Code:
#include <stdio.h>


struct MyStruct{

	double V1;     
	double V2;      
	double * A1;  
	double * A2; 		             

};


int main() {


	int n = 10; 

	struct MyStruct *x;
	x = (struct MyStruct*)malloc((n)*sizeof(struct MyStruct));


	for( i = 0; i < n; i++ ){			
		x[i].A1 = (double*)malloc(60*sizeof(double));
		x[i].A2 = (double*)malloc(60*sizeof(double));
	}


	//
	//
	// insert useful code here
	//
	//
	    
	    
	for( i = 0; i < n; i++ ){
		free(x[i].A1);
		free(x[i].A2);
	}	  	
	
	free(x);     	      


return 0;       
}