It isn't. You call delete temp; before ever initializing it, and it is initialized to the value of trav only after trav has been "incremented" (trav = trav->next).
Drawing a picture of the linked list and then following through the function step by step is a great way to see if it actually works. When you do this, check for a case when it is empty, when there is only one node, and when there are multiple nodes.
Then you need to change the logic of your loop. The initialization was a hint, but I am not going to write it for you. Logically you want your trav to be pointing at the node ahead of the node temp is pointing to. So the first time through you want trav to move up a node but temp to stay pointing at head so it can delete it before also moving forward.