forked from vieter-v/libvieter
refactor: Added free function for package struct.
While going through with the renaming, I saw that I actually forgot to implement that part.
This commit is contained in:
parent
76e4adae92
commit
03bae82569
2 changed files with 11 additions and 0 deletions
|
|
@ -221,3 +221,12 @@ char *vieter_package_to_description(Pkg *pkg) {
|
|||
|
||||
return description;
|
||||
}
|
||||
|
||||
void vieter_package_free(Pkg **ptp) {
|
||||
FREE_STRING((*ptp)->path);
|
||||
vieter_package_info_free((*ptp)->info);
|
||||
vieter_package_dynarray_free((*ptp)->files);
|
||||
free(*ptp);
|
||||
*ptp = NULL;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue