refactor: Added free function for package struct.
While going through with the renaming, I saw that I actually forgot to implement that part.remotes/1762055944122108742/tmp_refs/heads/package
							parent
							
								
									76e4adae92
								
							
						
					
					
						commit
						03bae82569
					
				| 
						 | 
					@ -221,3 +221,12 @@ char *vieter_package_to_description(Pkg *pkg) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return description;
 | 
						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;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,6 +57,8 @@ void test_pkg_read_archive_files() {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	TEST_CHECK(pkg->compression = 14);
 | 
						TEST_CHECK(pkg->compression = 14);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						vieter_package_free(&pkg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void test_pkg_read_archive_desc() {
 | 
					void test_pkg_read_archive_desc() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue