C, Deleting all nodes from a queue od structures
===

I'm trying to delete all nodes from my queue of structures.

Structure:

    struct element{

        int id;
        int sign;
        int year;
        int month;
        double amount;

        struct element *next;


    };

    struct queue{
        struct element *head;  
    
        int size;
    };

and funtcion I wrote:

    void delete(struct queue *queue){  
    	if (queue->size == 0){
    		printf("Structure is empty\n");}
    
    	else {
                struct element* this;
                struct element* other;		
    
    		
    		for(this=queue->head;this!=NULL;this=other)
    {
            other=this->next;
            free(this);
        }
        free(queue);
    	
            }}

It doesn't work, and I'm out of ideas. Any suggestions?