Make tests pass and introduce a memory leak
Since 37fbafcd92
the tests hasn't worked
since a string on the stack was added as version for a virtual package.
Instead create the version string on the heap and then simply leak it.
A short running program as apk shouldn't need to worry about memory
leaks.
cute-signatures
parent
c635c04669
commit
f8d5aa58f9
|
@ -97,7 +97,7 @@ static struct apk_package *create_virtual_package(struct apk_database *db, struc
|
|||
if (virtpkg == NULL) return 0;
|
||||
|
||||
virtpkg->name = name;
|
||||
virtpkg->version = apk_blob_atomize(APK_BLOB_STR(ver));
|
||||
virtpkg->version = apk_blob_atomize_dup(APK_BLOB_STR(ver));
|
||||
virtpkg->description = strdup("virtual meta package");
|
||||
virtpkg->arch = apk_blob_atomize(APK_BLOB_STR("noarch"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue