- lseek(fp,descriptor->length-8,SEEK_SET);
- read(fp,&descriptor->version,4);
- read(fp,&descriptor->header_offset,4);
- lseek(fp,descriptor->header_offset,SEEK_SET);
- read(fp,&descriptor->nb_of_sessions,2);
-
- descriptor->sessions=(s_cdi_session *)malloc(descriptor->nb_of_sessions*sizeof(s_cdi_session));
- if (descriptor->sessions==0)
+
+ lseek(fp, descriptor->length - 8, SEEK_SET);
+ read(fp, &descriptor->version, 4);
+ read(fp, &descriptor->header_offset, 4);
+ lseek(fp, descriptor->header_offset, SEEK_SET);
+ read(fp, &descriptor->nb_of_sessions, 2);
+
+ descriptor->sessions=(s_cdi_session *)malloc(descriptor->nb_of_sessions * sizeof(s_cdi_session));
+
+ if (descriptor->sessions == NULL)