Commit ef359260 authored by Eric Wong's avatar Eric Wong Committed by Max Kellermann

songvec: avoid free(NULL)

Potentially broken free() implementations don't like it
parent 74b34f7b
...@@ -60,7 +60,9 @@ void songvec_add(struct songvec *sv, Song *add) ...@@ -60,7 +60,9 @@ void songvec_add(struct songvec *sv, Song *add)
void songvec_free(struct songvec *sv) void songvec_free(struct songvec *sv)
{ {
free(sv->base); if (sv->base) {
sv->base = NULL; free(sv->base);
sv->base = NULL;
}
sv->nr = 0; sv->nr = 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment