Extension cords themselves are not dangerous, but not using them correctly can be. Using under rated, damaged, or overloading extension cords by plugging in too many items in to them is what can lead to issues.
As long as the extension cord is rated to the right capacity of the service that you are trying to run through it there should be no issue. For your freezer pictured I would think that a 15 amp rated cord should be fine, but I am not an electrician.
Go to you local hardware store and pick up a new cord that is the right length and capacity for your use. If you are not sure what you are looking for, I am sure there will be someone that can help.
Then at home, dont split off of it and run your other fridge, the tv, and a microwave off of it. Straight from the wall to your freezer and you will be fine.