aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-02-22 00:39:33 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-02-22 00:39:33 -0500
commitbccb39c88e157a90659e8226e2fadad7dc258130 (patch)
tree2095fca1618e1a01bc7b291b79873e063202d106 /src/lib
parent83831af6502e68fe6199c29614e2df68ffbca170 (diff)
downloadstasis-bccb39c88e157a90659e8226e2fadad7dc258130.tar.gz
Bugfix: Avoid segfault on freeing uninitialized Wheel struct
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/core/wheel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/core/wheel.c b/src/lib/core/wheel.c
index c7e485a..79b5a21 100644
--- a/src/lib/core/wheel.c
+++ b/src/lib/core/wheel.c
@@ -113,6 +113,9 @@ struct Wheel *get_wheel_info(const char *basepath, const char *name, char *to_ma
void wheel_free(struct Wheel **wheel) {
struct Wheel *w = (*wheel);
+ if (!w) {
+ return;
+ }
guard_free(w->path_name);
guard_free(w->file_name);
guard_free(w->distribution);