Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
apk-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
61
Issues
61
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
apk-tools
Commits
0c1a26f2
Commit
0c1a26f2
authored
Jun 19, 2013
by
Timo Teräs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
del: fix a segfault when trying to delete uninstalled packages
parent
0e9d67ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/del.c
src/del.c
+4
-1
No files found.
src/del.c
View file @
0c1a26f2
...
...
@@ -81,6 +81,7 @@ static int del_main(void *pctx, struct apk_database *db, struct apk_string_array
struct
not_deleted_ctx
ndctx
=
{};
struct
apk_name_array
*
names
;
struct
apk_name
**
pname
;
struct
apk_package
*
pkg
;
struct
apk_changeset
changeset
=
{};
struct
apk_change
*
change
;
struct
apk_provider
*
p
;
...
...
@@ -92,7 +93,9 @@ static int del_main(void *pctx, struct apk_database *db, struct apk_string_array
for
(
i
=
0
;
i
<
args
->
num
;
i
++
)
{
names
->
item
[
i
]
=
apk_db_get_name
(
db
,
APK_BLOB_STR
(
args
->
item
[
i
]));
delete_from_world
(
apk_pkg_get_installed
(
names
->
item
[
i
]),
NULL
,
NULL
,
ctx
);
pkg
=
apk_pkg_get_installed
(
names
->
item
[
i
]);
if
(
pkg
!=
NULL
)
delete_from_world
(
pkg
,
NULL
,
NULL
,
ctx
);
}
r
=
apk_solver_solve
(
db
,
0
,
ctx
->
world
,
&
changeset
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment