After you create your SUSceneRef array, you must initialize each SUSceneRef to SU_INVALID to ensure there is no junk data in the array:
SUSceneRef *p_scenes = new SUSceneRef[num_s];
for (size_t i = 0; i < num_s; ++i) {
SUSetInvalid(p_scenes[i]);
}
res = SUModelGetScenes(model, num_s, p_scenes, &realcount);