You can simply add next, prev pointers into SIM_FILE_HEAD to avoid calling malloc twice for one SimEF. However, a more common pattern would be:
```C
typedef struct SimFileRec_ {
  struct SimFileRec_* next;
  struct SimFileRec_* prev;
  SimFileType         type;
  unsigned short      id;
  unsigned short      flags;
} SimFileRec, *SimFile;
```
So you can have:
```C
typedef struct {
  SimFileRec common;
  ...
} SimFileEFDedicatedRec, *SimFileEFDedicated;

typedef struct {
  SimFileRec common;
  ...
} SimFileEFLinearRec, *SimFileEFLinear;
```
Then you only have to allocate once for either types.