а лучше так. /* void prioq_free (struct prioq** queue) { if (*queue == NULL) { fprintf (stderr, "%s:The queue is free\n", __func__); return; } if ((*queue)->heap != NULL) { free ((*queue)->heap); } free (*queue); *queue = NULL; fprintf (stderr, "%s:The queue is free\n", __func__); } */