songvec_free => songvec_destroy
"free" implies the songvec structure itself is freed, which is not the case.
This commit is contained in:
parent
5ec578119f
commit
6075119f0a
@ -220,7 +220,7 @@ static Directory *newDirectory(const char *dirname, Directory * parent)
|
||||
static void freeDirectory(Directory * directory)
|
||||
{
|
||||
freeDirectoryList(directory->subDirectories);
|
||||
songvec_free(&directory->songs);
|
||||
songvec_destroy(&directory->songs);
|
||||
if (directory->path)
|
||||
free(directory->path);
|
||||
free(directory);
|
||||
|
@ -58,7 +58,7 @@ void songvec_add(struct songvec *sv, Song *add)
|
||||
sv->base[sv->nr - 1] = add;
|
||||
}
|
||||
|
||||
void songvec_free(struct songvec *sv)
|
||||
void songvec_destroy(struct songvec *sv)
|
||||
{
|
||||
if (sv->base) {
|
||||
free(sv->base);
|
||||
|
@ -17,6 +17,6 @@ int songvec_delete(struct songvec *sv, Song *del);
|
||||
|
||||
void songvec_add(struct songvec *sv, Song *add);
|
||||
|
||||
void songvec_free(struct songvec *sv);
|
||||
void songvec_destroy(struct songvec *sv);
|
||||
|
||||
#endif /* SONGVEC_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user