void prioq_free(struct prioq* queue) { unsigned int i = 0; if (queue == NULL) { fprintf(stderr, "prioq_free:The queue not exists\n"); } else { free(queue->heap); free(queue); fprintf(stderr,"prioq_free: the queue is free\n"); } } Так что-ли?