giusto grazie

ho risolto così

Codice PHP:

while(p!=NULL){
    
app=p;
    
p=p->next;
    
free(app);