I guess you are returning the address of a local (struct) variable, which, when you try to use it later, will give you a segmentation fault (trying to access an invalid address).
You can dynamically allocate a structure in function and return it.
struct IntArray* erzeugeArr(int length)
{
struct IntArray *erzeugt=(struct IntArray*)malloc(sizeof(struct IntArray*));
erzeugt->array = (int*) malloc(sizeof (int)*length);
return erzeugt;
}
int main()
{
struct IntArray *str;
str=erzeugeArr(10);
//use str for processing
}